From 7847b866466d0969ae7cbceebc9f8d1a0a4e0b00 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 26 Sep 2010 21:45:50 +0900 Subject: calypsomodem: Make SIM Toolkit envelope submission work again --- drivers/calypsomodem/stk.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'drivers/calypsomodem') 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, -- cgit v1.2.3