summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2010-06-17 15:42:11 +0200
committerDenis Kenzior <denkenz@gmail.com>2010-06-18 14:11:11 -0500
commit713805ae57fc4b67f6279e8b6d083f6d6fdc519a (patch)
tree94cbdfc90273727c6813d0590e3c1416126713a9
parentd0018e9772ab8cc6e66f26efc742ca0569a62bc4 (diff)
downloadofono-713805ae57fc4b67f6279e8b6d083f6d6fdc519a.tar.bz2
mbmmodem: Allow no response data for envelope.
Partially reverts http://git.kernel.org/?p=network/ofono/ofono.git;a=commitdiff;h=f98c6dc91702c0d14c0afa2a4e32102d3105568d
-rw-r--r--drivers/mbmmodem/stk.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mbmmodem/stk.c b/drivers/mbmmodem/stk.c
index cea902e2..77bd7b56 100644
--- a/drivers/mbmmodem/stk.c
+++ b/drivers/mbmmodem/stk.c
@@ -52,8 +52,8 @@ static void mbm_stke_cb(gboolean ok, GAtResult *result, gpointer user_data)
ofono_stk_envelope_cb_t cb = cbd->cb;
GAtResultIter iter;
struct ofono_error error;
- const guint8 *pdu;
- gint len;
+ const guint8 *pdu = NULL;
+ gint len = 0;
decode_at_error(&error, g_at_result_final_response(result));
@@ -64,11 +64,9 @@ static void mbm_stke_cb(gboolean ok, GAtResult *result, gpointer user_data)
g_at_result_iter_init(&iter, result);
- if (g_at_result_iter_next(&iter, "*STKE:") == FALSE)
- goto error;
-
- if (g_at_result_iter_next_hexstring(&iter, &pdu, &len) == FALSE)
- goto error;
+ if (g_at_result_iter_next(&iter, "*STKE:") == TRUE)
+ if (g_at_result_iter_next_hexstring(&iter, &pdu, &len) == FALSE)
+ goto error;
cb(&error, pdu, len, cbd->data);
return;