summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Zabaluev <mikhail.zabaluev@nokia.com>2011-01-31 19:46:47 +0200
committerMikhail Zabaluev <mikhail.zabaluev@nokia.com>2011-01-31 19:48:58 +0200
commitf69dc4be0e713eef64ecb65c84ded2fa357b39b9 (patch)
tree1506bb2128817d4e9f75b2eac267b7c6e6ceadaa
parentc4cffddbaea180ba3fddebed81097c03e2cca959 (diff)
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.
-rw-r--r--src/media-factory.c7
1 files changed, 7 insertions, 0 deletions
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);