AT+COLR does not have a local override; it cannot be factored with the
other commands.

This partially reverts commit f2baa88d7577649358f1f8587e5a9b6aa730ca41.
---
 drivers/atmodem/call-settings.c |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/drivers/atmodem/call-settings.c b/drivers/atmodem/call-settings.c
index 7b00357..eaab89e 100644
--- a/drivers/atmodem/call-settings.c
+++ b/drivers/atmodem/call-settings.c
@@ -331,7 +331,34 @@ error:
 
 static void colr_query_cb(gboolean ok, GAtResult *result, gpointer user_data)
 {
-       query_template("+COLR:", ok, result, user_data);
+       struct cb_data *cbd = user_data;
+       ofono_call_settings_status_cb_t cb = cbd->cb;
+       struct ofono_error error;
+       GAtResultIter iter;
+       int status;
+
+       decode_at_error(&error, g_at_result_final_response(result));
+
+       if (!ok) {
+               cb(&error, -1, cbd->data);
+               return;
+       }
+
+       g_at_result_iter_init(&iter, result);
+
+       if (g_at_result_iter_next(&iter, "+COLR:") == FALSE)
+               goto error;
+
+       if (g_at_result_iter_next_number(&iter, &status) == FALSE)
+               goto error;
+
+       DBG("network: %d", status);
+
+       cb(&error, status, cbd->data);
+       return;
+
+error:
+       CALLBACK_WITH_FAILURE(cb, -1, cbd->data);
 }
 
 static void at_colr_query(struct ofono_call_settings *cs,
-- 
1.7.1

_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to