ifx: Allow +XSIM notification to arrive during AT+XSIMSTATE=1

When not using none_prefix for matching the responses of AT+XSIMSTATE
call, it will consume all notifications. And this includes the initial
SIM state that the modem sends at that point. Without this notification
the SIM will never be marked as inserted.
This commit is contained in:
Marcel Holtmann 2010-09-25 14:20:32 +09:00
parent 1267247f5e
commit f5eaf8a3fb
1 changed files with 3 additions and 1 deletions

View File

@ -73,6 +73,8 @@ static char *dlc_prefixes[NUM_DLC] = { "Voice: ", "Net: ", "GPRS: ", "Aux: " };
static const char *dlc_nodes[NUM_DLC] = { "/dev/ttyGSM1", "/dev/ttyGSM2",
"/dev/ttyGSM7", "/dev/ttyGSM8" };
static const char *none_prefix[] = { NULL };
struct ifx_data {
GIOChannel *device;
GAtMux *mux;
@ -246,7 +248,7 @@ static void cfun_enable(gboolean ok, GAtResult *result, gpointer user_data)
FALSE, modem, NULL);
/* enable XSIM and XLOCK notifications */
g_at_chat_send(data->dlcs[AUX_DLC], "AT+XSIMSTATE=1", NULL,
g_at_chat_send(data->dlcs[AUX_DLC], "AT+XSIMSTATE=1", none_prefix,
NULL, NULL, NULL);
}