summaryrefslogtreecommitdiffstats
path: root/drivers/calypsomodem
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-09-26 21:45:50 +0900
committerMarcel Holtmann <marcel@holtmann.org>2010-09-26 21:45:50 +0900
commit7847b866466d0969ae7cbceebc9f8d1a0a4e0b00 (patch)
treec2e899a286a00df05fd75f03c7f8cdaa61b6147f /drivers/calypsomodem
parentf6c119ba20f8ad1e65ff0cec2d6c3c11e8791c84 (diff)
downloadofono-7847b866466d0969ae7cbceebc9f8d1a0a4e0b00.tar.bz2
calypsomodem: Make SIM Toolkit envelope submission work again
Diffstat (limited to 'drivers/calypsomodem')
-rw-r--r--drivers/calypsomodem/stk.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/calypsomodem/stk.c b/drivers/calypsomodem/stk.c
index c7300841..052e1f98 100644
--- a/drivers/calypsomodem/stk.c
+++ b/drivers/calypsomodem/stk.c
@@ -73,26 +73,21 @@ static void sate_cb(gboolean ok, GAtResult *result, gpointer user_data)
error.type = OFONO_ERROR_TYPE_NO_ERROR;
}
- if (!ok) {
- cb(&error, NULL, 0, cbd->data);
- return;
- }
+ if (!ok)
+ goto done;
g_at_result_iter_init(&iter, result);
if (g_at_result_iter_next(&iter, "%SATE:") == FALSE)
- goto error;
+ goto done;
/* Response data is optional */
g_at_result_iter_next_hexstring(&iter, &pdu, &len);
DBG("len %d", len);
+done:
cb(&error, pdu, len, cbd->data);
- return;
-
-error:
- CALLBACK_WITH_FAILURE(cb, NULL, 0, cbd->data);
}
static void calypso_stk_envelope(struct ofono_stk *stk, int length,