summaryrefslogtreecommitdiffstats
path: root/plugins/ifx.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-09-25 14:20:32 +0900
committerMarcel Holtmann <marcel@holtmann.org>2010-09-25 14:20:32 +0900
commitf5eaf8a3fba9178d5b55f9968a7935134641677c (patch)
tree883ea89e2683c51a5908ae6b4575fb7003448046 /plugins/ifx.c
parent1267247f5e9f9b0a7661a3f0db9eef43d92a1202 (diff)
downloadofono-f5eaf8a3fba9178d5b55f9968a7935134641677c.tar.bz2
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.
Diffstat (limited to 'plugins/ifx.c')
-rw-r--r--plugins/ifx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ifx.c b/plugins/ifx.c
index 5ef947eb..451658cd 100644
--- a/plugins/ifx.c
+++ b/plugins/ifx.c
@@ -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);
}