summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/huaweimodem/ussd.c8
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);
}