* [PATCH] AT modem: fix COLR reporting
@ 2011-01-13 14:18 =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-13 16:33 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont @ 2011-01-13 14:18 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-13 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 14:18 [PATCH] AT modem: fix COLR reporting =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-13 16:33 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.