gsm: fix up CID signed/unsigned confusion
-1 = no APN set, so use modem default. We'll have to fix a few more things up for modems like hso/mbm that don't use ATDT and require CIDs, but this gets us halfway there for other devices.
This commit is contained in:
@@ -431,7 +431,7 @@ unsolicited_disable_done (MMModem *modem,
|
||||
}
|
||||
|
||||
/* Otherwise, kill any existing connection */
|
||||
if (mm_generic_gsm_get_cid (MM_GENERIC_GSM (modem)) >= 0)
|
||||
if (hso_get_cid (MM_MODEM_HSO (modem)) >= 0)
|
||||
hso_call_control (MM_MODEM_HSO (modem), FALSE, TRUE, disable_done, info);
|
||||
else
|
||||
disable_done (modem, NULL, info);
|
||||
|
||||
@@ -728,18 +728,15 @@ mbm_auth_done (MMSerialPort *port,
|
||||
MMCallbackInfo *info = (MMCallbackInfo *) user_data;
|
||||
MMGenericGsm *modem = MM_GENERIC_GSM (info->modem);
|
||||
char *command;
|
||||
guint32 cid;
|
||||
|
||||
if (error) {
|
||||
mm_generic_gsm_connect_complete (modem, error, info);
|
||||
return;
|
||||
}
|
||||
|
||||
cid = mm_generic_gsm_get_cid (modem);
|
||||
|
||||
mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), "AT*E2NAP=1", 3, NULL, NULL);
|
||||
|
||||
command = g_strdup_printf ("AT*ENAP=1,%d", cid);
|
||||
command = g_strdup_printf ("AT*ENAP=1,%d", mm_generic_gsm_get_cid (modem));
|
||||
mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), command, 3, enap_done, user_data);
|
||||
g_free (command);
|
||||
}
|
||||
|
||||
@@ -2695,7 +2695,7 @@ connect (MMModem *modem,
|
||||
MMGenericGsmPrivate *priv = MM_GENERIC_GSM_GET_PRIVATE (modem);
|
||||
MMCallbackInfo *info;
|
||||
char *command;
|
||||
guint32 cid = mm_generic_gsm_get_cid (MM_GENERIC_GSM (modem));
|
||||
gint cid = mm_generic_gsm_get_cid (MM_GENERIC_GSM (modem));
|
||||
|
||||
info = mm_callback_info_new (modem, callback, user_data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user