sierra: ignore +PACSP0 on GSM devices
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user