Hi Andras,
> +static struct voicecall *voicecall_select(struct ofono_voicecall *vc,
> + unsigned int id, int code)
> +{
> + struct voicecall *v = NULL;
> + GSList *l;
> +
> + if (id != 0) {
> + l = g_slist_find_custom(vc->call_list, GUINT_TO_POINTER(id),
> + call_compare_by_id);
> +
> + if (l == NULL)
> + return NULL;
> +
> + v = l->data;
> + } else if (g_slist_length(vc->call_list) == 1) {
> + v = vc->call_list->data;
> +
> + switch (code) {
> + case SS_MT_VOICECALL_RETRIEVED:
> + if (v->remote_held != TRUE)
> + return NULL;
> + break;
> + case SS_MT_VOICECALL_ON_HOLD:
> + if (v->remote_held == TRUE)
> + return NULL;
> + break;
> + case SS_MT_MULTIPARTY_VOICECALL:
> + if (v->remote_multiparty == TRUE)
> + return NULL;
> + break;
> + default:
> + return NULL;
> + }
I was mostly fine with this patch, but didn't see the real need in these
checks, so I re-factored the patch slightly afterward. Let me know if I
broke something.
> + }
> +
> + return v;
> +}
> +
Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono