diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-10-27 12:20:37 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-10-27 12:25:51 -0500 |
commit | 8eb658f5ea28cccf302e5bbcad0c384ba563ee6d (patch) | |
tree | 08c54d18245ae84443dc4f0cff8437aa825b6889 /drivers | |
parent | 412ce05fdef660183a3ed59a697a00da0e420604 (diff) | |
download | ofono-8eb658f5ea28cccf302e5bbcad0c384ba563ee6d.tar.bz2 |
mbmmodem: Notify core about handled commands
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mbmmodem/stk.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/mbmmodem/stk.c b/drivers/mbmmodem/stk.c index f2790571..87a2dd0e 100644 --- a/drivers/mbmmodem/stk.c +++ b/drivers/mbmmodem/stk.c @@ -179,12 +179,26 @@ static void stki_notify(GAtResult *result, gpointer user_data) static void stkn_notify(GAtResult *result, gpointer user_data) { + struct ofono_stk *stk = user_data; + GAtResultIter iter; + const guint8 *pdu; + gint len; + DBG(""); - /* Proactive command has been handled by the modem. Should - * the core be notified? For now we just ignore it because - * we must not respond to the command. - */ + /* Proactive command has been handled by the modem. */ + g_at_result_iter_init(&iter, result); + + if (g_at_result_iter_next(&iter, "*STKN:") == FALSE) + return; + + if (g_at_result_iter_next_hexstring(&iter, &pdu, &len) == FALSE) + return; + + if (len == 0) + return; + + ofono_stk_proactive_command_handled_notify(stk, len, pdu); } static void stkend_notify(GAtResult *result, gpointer user_data) |