From f69dc4be0e713eef64ecb65c84ded2fa357b39b9 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 31 Jan 2011 19:46:47 +0200 Subject: Reject incoming calls from the same URI as the local user (fd.o #33716) This is not supported in StreamedMedia channels, and an assertion in tpsip_media_channel_receive_invite() sees to it. --- src/media-factory.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/media-factory.c b/src/media-factory.c index 245d11d..19b0494 100644 --- a/src/media-factory.c +++ b/src/media-factory.c @@ -357,6 +357,13 @@ tpsip_nua_i_invite_cb (TpBaseConnection *conn, DEBUG("Got incoming invite from <%s>", tp_handle_inspect (contact_repo, handle)); + if (handle == conn->self_handle) + { + DEBUG("cannot handle calls from self"); + nua_respond (ev->nua_handle, 501, "Calls from self are not supported", TAG_END()); + return TRUE; + } + channel = new_media_channel (fac, handle, handle, channel_flags); tpsip_media_channel_receive_invite (channel, ev->nua_handle); -- cgit v1.2.3