aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-03-06 10:28:11 -0800
committerDan Williams <dcbw@redhat.com>2010-03-06 10:28:11 -0800
commit54c1d069eb688f60cc721fb435953dfaebcfa6d7 (patch)
tree03253e963d96e1dfba83b54a323251f70e7473bb /plugins
parent31fb97919cd7d95d1f9b23bd0c2428d8a19dc3e4 (diff)
gsm: rework registration handling
First, generically handle registration polling if the device does not support unsolicited registration. Second, using the new creg/cgreg parsing functions from mm-modem-helpers.c, handle CREG=2 unsolicited registration replies to capture the GSM LAC/CI for the location information API. Because of these changes we can simplify the registration polling during connection as well by using the common registration parsing code and the cached registration state.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mm-modem-hso.c2
-rw-r--r--plugins/mm-modem-huawei-gsm.c2
-rw-r--r--plugins/mm-modem-mbm.c2
-rw-r--r--plugins/mm-modem-zte.c1
4 files changed, 0 insertions, 7 deletions
diff --git a/plugins/mm-modem-hso.c b/plugins/mm-modem-hso.c
index 8bd42889..a3fb95c4 100644
--- a/plugins/mm-modem-hso.c
+++ b/plugins/mm-modem-hso.c
@@ -647,8 +647,6 @@ grab_port (MMModem *modem,
if (ptype == MM_PORT_TYPE_PRIMARY) {
GRegex *regex;
- mm_generic_gsm_set_unsolicited_registration (gsm, TRUE);
-
regex = g_regex_new ("_OWANCALL: (\\d),\\s*(\\d)\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
mm_serial_port_add_unsolicited_msg_handler (MM_SERIAL_PORT (port), regex, connection_enabled, modem, NULL);
g_regex_unref (regex);
diff --git a/plugins/mm-modem-huawei-gsm.c b/plugins/mm-modem-huawei-gsm.c
index d450f258..76a2d76b 100644
--- a/plugins/mm-modem-huawei-gsm.c
+++ b/plugins/mm-modem-huawei-gsm.c
@@ -560,8 +560,6 @@ grab_port (MMModem *modem,
if (ptype == MM_PORT_TYPE_SECONDARY) {
GRegex *regex;
- mm_generic_gsm_set_unsolicited_registration (MM_GENERIC_GSM (modem), TRUE);
-
regex = g_regex_new ("\\r\\n\\^RSSI:(\\d+)\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
mm_serial_port_add_unsolicited_msg_handler (MM_SERIAL_PORT (port), regex, handle_signal_quality_change, modem, NULL);
g_regex_unref (regex);
diff --git a/plugins/mm-modem-mbm.c b/plugins/mm-modem-mbm.c
index eb98990c..417457f7 100644
--- a/plugins/mm-modem-mbm.c
+++ b/plugins/mm-modem-mbm.c
@@ -747,8 +747,6 @@ grab_port (MMModem *modem,
if (port && MM_IS_SERIAL_PORT (port) && (ptype == MM_PORT_TYPE_PRIMARY)) {
GRegex *regex;
- mm_generic_gsm_set_unsolicited_registration (MM_GENERIC_GSM (modem), TRUE);
-
regex = g_regex_new ("\\r\\n\\*EMRDY: \\d\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
mm_serial_port_add_unsolicited_msg_handler (MM_SERIAL_PORT (port), regex, mbm_emrdy_received, modem, NULL);
g_regex_unref (regex);
diff --git a/plugins/mm-modem-zte.c b/plugins/mm-modem-zte.c
index 4412fa22..663a728e 100644
--- a/plugins/mm-modem-zte.c
+++ b/plugins/mm-modem-zte.c
@@ -211,7 +211,6 @@ grab_port (MMModem *modem,
if (port && MM_IS_SERIAL_PORT (port)) {
GRegex *regex;
- mm_generic_gsm_set_unsolicited_registration (gsm, TRUE);
g_object_set (port, MM_PORT_CARRIER_DETECT, FALSE, NULL);
regex = g_regex_new ("\\r\\n\\+ZUSIMR:(.*)\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);