diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-08-12 23:46:02 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-08-12 23:46:02 -0500 |
commit | 9a00f06329e0e1965ab9eaa32db2e1ddd09691c1 (patch) | |
tree | f3c90e16f754525bf4f45068cfaca69519a6b5eb /drivers/stemodem | |
parent | 361773f4d8d74773cdae0a6b204479440876f1b7 (diff) | |
download | ofono-9a00f06329e0e1965ab9eaa32db2e1ddd09691c1.tar.bz2 |
stemodem: register should not be called from probe
Diffstat (limited to 'drivers/stemodem')
-rw-r--r-- | drivers/stemodem/voicecall.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index db3b7219..aa5a071a 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -533,6 +533,16 @@ static void ecav_notify(GAtResult *result, gpointer user_data) } } +static void ste_voicecall_initialized(gboolean ok, GAtResult *result, + gpointer user_data) +{ + struct ofono_voicecall *vc = user_data; + struct voicecall_data *vd = ofono_voicecall_get_data(vc); + + g_at_chat_register(vd->chat, "*ECAV:", ecav_notify, FALSE, vc, NULL); + ofono_voicecall_register(vc); +} + static int ste_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor, void *data) { @@ -544,9 +554,8 @@ static int ste_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor, ofono_voicecall_set_data(vc, vd); - g_at_chat_send(vd->chat, "AT*ECAM=1", NULL, NULL, NULL, NULL); - g_at_chat_register(vd->chat, "*ECAV:", ecav_notify, FALSE, vc, NULL); - ofono_voicecall_register(vc); + g_at_chat_send(vd->chat, "AT*ECAM=1", none_prefix, + ste_voicecall_initialized, vc, NULL); return 0; } |