summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-09-21 09:32:46 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-09-22 00:07:06 -0500
commit3362de001041604db12ded37c238c350f1a89917 (patch)
treef709f30f33877881fc8ef0232e44eb83c087f5ae
parent63416e28519854712ed972c00c025280d267f482 (diff)
downloadofono-3362de001041604db12ded37c238c350f1a89917.tar.bz2
Move SSN unsolicited notification activation
-rw-r--r--drivers/atmodem/ssn.c10
-rw-r--r--drivers/atmodem/voicecall.c1
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/atmodem/ssn.c b/drivers/atmodem/ssn.c
index 775d1fe5..bb77e95d 100644
--- a/drivers/atmodem/ssn.c
+++ b/drivers/atmodem/ssn.c
@@ -98,17 +98,16 @@ out:
ofono_ssn_cssu_notify(ssn, code2, index, &ph);
}
-static gboolean at_ssn_register(gpointer user)
+static void at_ssn_initialized(gboolean ok, GAtResult *result,
+ gpointer user_data)
{
- struct ofono_ssn *ssn = user;
+ struct ofono_ssn *ssn = user_data;
GAtChat *chat = ofono_ssn_get_data(ssn);
g_at_chat_register(chat, "+CSSI:", cssi_notify, FALSE, ssn, NULL);
g_at_chat_register(chat, "+CSSU:", cssu_notify, FALSE, ssn, NULL);
ofono_ssn_register(ssn);
-
- return FALSE;
}
static int at_ssn_probe(struct ofono_ssn *ssn, unsigned int vendor,
@@ -117,7 +116,8 @@ static int at_ssn_probe(struct ofono_ssn *ssn, unsigned int vendor,
GAtChat *chat = data;
ofono_ssn_set_data(ssn, chat);
- g_idle_add(at_ssn_register, ssn);
+ g_at_chat_send(chat, "AT+CSSN=1,1", NULL,
+ at_ssn_initialized, ssn, NULL);
return 0;
}
diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index 4d6cfd22..c7b9ac7f 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -979,7 +979,6 @@ static int at_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,
g_at_chat_send(chat, "AT+CRC=1", NULL, NULL, NULL, NULL);
g_at_chat_send(chat, "AT+CLIP=1", NULL, NULL, NULL, NULL);
g_at_chat_send(chat, "AT+COLP=1", NULL, NULL, NULL, NULL);
- g_at_chat_send(chat, "AT+CSSN=1,1", NULL, NULL, NULL, NULL);
g_at_chat_send(chat, "AT+CCWA=1", NULL,
at_voicecall_initialized, vc, NULL);
return 0;