Hi Jeevaka,

> +static void ctm_notify(GAtResult *result, gpointer user_data)
> +{
> +     struct ofono_voicecall *vc = user_data;
> +     struct voicecall_data *vd = ofono_voicecall_get_data(vc);
> +     GSList *l;
> +     struct ofono_call *call;
> +
> +     l = g_slist_find_custom(vd->calls, GINT_TO_POINTER(0),
> +                             at_util_call_compare_by_status);

So here we find the first call in the active state.  This is not
necessarily guaranteed to be the only active call.  Ideally this
notification should also provide the call id.

So the question is, is this safe enough and not subject to race conditions?

> +     if (l == NULL) {
> +             ofono_error("CTM for unknown call");
> +             return;
> +     }
> +
> +     call = l->data;
> +
> +     ofono_voicecall_tty_notify(vc, call);
> +}
> +

Regards,
-Denis
_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to