summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2011-12-08 19:04:10 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2012-02-09 17:29:26 +0100
commitc910be247d3be7b86409fd9a77165d295d94a91f (patch)
tree171921cca9126719fdfe0e7e4fc7ffb29d0778cf
parent30cb4df8d9a603f58b7ab3d4c74b1563033b8a76 (diff)
downloadtelepathy-farstream-c910be247d3be7b86409fd9a77165d295d94a91f.tar.gz
Add a reason when rejecting invalid codecs
-rw-r--r--telepathy-farstream/call-content.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/telepathy-farstream/call-content.c b/telepathy-farstream/call-content.c
index b2c7516..56a0c02 100644
--- a/telepathy-farstream/call-content.c
+++ b/telepathy-farstream/call-content.c
@@ -667,11 +667,21 @@ process_media_description_try_codecs (TfCallContent *self, FsStream *fsstream,
}
else
{
+ GValueArray *reason = tp_value_array_build (4,
+ G_TYPE_UINT, 0,
+ G_TYPE_UINT, TP_CALL_STATE_CHANGE_REASON_MEDIA_ERROR,
+ G_TYPE_STRING, TP_ERROR_STR_MEDIA_CODECS_INCOMPATIBLE,
+ G_TYPE_STRING,
+ "Remote codecs are not compatible with the local ones",
+ G_TYPE_INVALID);
+
g_debug ("Rejecting Media Description");
tp_cli_call_content_media_description_call_reject (media_description,
- -1, NULL, NULL, NULL, NULL, NULL);
+ -1, reason, NULL, NULL, NULL, NULL);
+ g_value_array_free (reason);
g_object_unref (media_description);
}
+ g_clear_error (&error);
}
static void