mirror of git://git.sysmocom.de/ofono
atmodem: fix +COLR parsing
AT+COLR does not have a local presentation mode and thus it cannot be
factored with the other commands.
This partially reverts commit f2baa88d75
.
This commit is contained in:
parent
07acb249dc
commit
bcfd049853
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue