Make sure the atmodem handles ATD properly

The driver must set any existing active calls to held
This commit is contained in:
Denis Kenzior 2009-11-13 15:34:41 -06:00
parent 5e8583f1b7
commit 1a8dd438b2
1 changed files with 12 additions and 0 deletions

View File

@ -273,6 +273,7 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data)
int validity = 2;
struct ofono_error error;
struct ofono_call *call;
GSList *l;
dump_response("atd_cb", ok, result);
@ -281,6 +282,17 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data)
if (!ok)
goto out;
/* On a success, make sure to put all active calls on hold */
for (l = vd->calls; l; l = l->next) {
call = l->data;
if (call->status != 0)
continue;
call->status = 1;
ofono_voicecall_notify(vc, call);
}
g_at_result_iter_init(&iter, result);
if (g_at_result_iter_next(&iter, "+COLP:")) {