sierra: ignore +PACSP0 on GSM devices

This commit is contained in:
Dan Williams
2010-02-09 22:14:06 -08:00
parent 33c63a6681
commit 953095466d
+8 -1
View File
@@ -117,9 +117,16 @@ grab_port (MMModem *modem,
port = mm_generic_gsm_grab_port (gsm, subsys, name, ptype, error);
if (port && MM_IS_SERIAL_PORT (port))
if (port && MM_IS_SERIAL_PORT (port)) {
GRegex *regex;
g_object_set (G_OBJECT (port), MM_PORT_CARRIER_DETECT, FALSE, NULL);
regex = g_regex_new ("\\r\\n\\+PACSP0\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
mm_serial_port_add_unsolicited_msg_handler (MM_SERIAL_PORT (port), regex, NULL, NULL, NULL);
g_regex_unref (regex);
}
return !!port;
}