diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-01-12 06:25:36 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-01-12 06:25:36 +0100 |
commit | b111c99026cef110f419f0523d30669ce920bbeb (patch) | |
tree | 4e0baa0786708e07249f504a9ef76f4e8d9f10ec /drivers/huaweimodem | |
parent | 2292753f4e14cf078dc7532f632eefc8e76846d8 (diff) | |
download | ofono-b111c99026cef110f419f0523d30669ce920bbeb.tar.bz2 |
huaweimodem: Reset errors for USSD cancel operation
Diffstat (limited to 'drivers/huaweimodem')
-rw-r--r-- | drivers/huaweimodem/ussd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/huaweimodem/ussd.c b/drivers/huaweimodem/ussd.c index 490aeb7a..002337a8 100644 --- a/drivers/huaweimodem/ussd.c +++ b/drivers/huaweimodem/ussd.c @@ -123,6 +123,14 @@ static void cusd_cancel_cb(gboolean ok, GAtResult *result, gpointer user_data) decode_at_error(&error, g_at_result_final_response(result)); + /* + * All errors and notifications arrive unexpected and + * thus just reset the state here. This is safer than + * getting stuck in a dead-lock. + */ + error.type = OFONO_ERROR_TYPE_NO_ERROR; + error.error = 0; + cb(&error, cbd->data); } |