diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-08-12 23:34:44 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-08-12 23:34:44 -0500 |
commit | fa8f094a96af3043239b8e18e33cfc9e9bf3d26d (patch) | |
tree | 98ffdbd44e5efbd978c5b64746d42013c015dd7f /drivers/calypsomodem | |
parent | ac524be99f8c72a2593e4ffcecad8beea7679e55 (diff) | |
download | ofono-fa8f094a96af3043239b8e18e33cfc9e9bf3d26d.tar.gz |
calypso: Use g_at_chat_clone
Diffstat (limited to 'drivers/calypsomodem')
-rw-r--r-- | drivers/calypsomodem/stk.c | 3 | ||||
-rw-r--r-- | drivers/calypsomodem/voicecall.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/calypsomodem/stk.c b/drivers/calypsomodem/stk.c index e63a81ff..acee5c37 100644 --- a/drivers/calypsomodem/stk.c +++ b/drivers/calypsomodem/stk.c @@ -235,7 +235,7 @@ static int calypso_stk_probe(struct ofono_stk *stk, struct stk_data *sd; sd = g_new0(struct stk_data, 1); - sd->chat = chat; + sd->chat = g_at_chat_clone(chat); ofono_stk_set_data(stk, sd); @@ -260,6 +260,7 @@ static void calypso_stk_remove(struct ofono_stk *stk) ofono_stk_set_data(stk, NULL); + g_at_chat_unref(sd->chat); g_free(sd); } diff --git a/drivers/calypsomodem/voicecall.c b/drivers/calypsomodem/voicecall.c index 56ec5a9c..97200964 100644 --- a/drivers/calypsomodem/voicecall.c +++ b/drivers/calypsomodem/voicecall.c @@ -384,11 +384,11 @@ static int calypso_voicecall_probe(struct ofono_voicecall *vc, unsigned int vend struct voicecall_data *vd; vd = g_new0(struct voicecall_data, 1); - vd->chat = chat; + vd->chat = g_at_chat_clone(chat); ofono_voicecall_set_data(vc, vd); - g_at_chat_send(chat, "AT%CPI=3", NULL, + g_at_chat_send(vd->chat, "AT%CPI=3", NULL, calypso_voicecall_initialized, vc, NULL); return 0; @@ -398,6 +398,9 @@ static void calypso_voicecall_remove(struct ofono_voicecall *vc) { struct voicecall_data *vd = ofono_voicecall_get_data(vc); + ofono_voicecall_set_data(vc, NULL); + + g_at_chat_unref(vd->chat); g_free(vd); } |