[telepathy-gabble/master] Return an error if AddContent is called on an ended Call.
Mike Ruprecht
mike.ruprecht at collabora.co.uk
Mon Jan 18 19:36:05 PST 2010
---
src/call-channel.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/call-channel.c b/src/call-channel.c
index 4ab260c..d796492 100644
--- a/src/call-channel.c
+++ b/src/call-channel.c
@@ -918,6 +918,14 @@ gabble_call_channel_add_content (GabbleSvcChannelTypeCall *iface,
const char *path;
GError *error = NULL;
+ if (self->priv->state == GABBLE_CALL_STATE_ENDED)
+ {
+ g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ "No contents can be added. The call has already ended.");
+ dbus_g_method_return_error (context, error);
+ return;
+ }
+
if (mtype == TP_MEDIA_STREAM_TYPE_AUDIO)
type = JINGLE_MEDIA_TYPE_AUDIO;
else if (mtype == TP_MEDIA_STREAM_TYPE_VIDEO)
--
1.5.6.5
More information about the telepathy-commits
mailing list