diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-21 22:06:41 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-21 22:06:41 +0800 |
commit | 92d12a99a6281dafcfb12ed279e63e8ca77053e9 (patch) | |
tree | 81136a5692f1015c13f2eb41fc987da32db9fdfc /libempathy | |
parent | 9a32d8b58f3b91b491b3d6cfe3a3e1bc6c98738c (diff) | |
download | gsoc2013-empathy-92d12a99a6281dafcfb12ed279e63e8ca77053e9.tar gsoc2013-empathy-92d12a99a6281dafcfb12ed279e63e8ca77053e9.tar.gz gsoc2013-empathy-92d12a99a6281dafcfb12ed279e63e8ca77053e9.tar.bz2 gsoc2013-empathy-92d12a99a6281dafcfb12ed279e63e8ca77053e9.tar.lz gsoc2013-empathy-92d12a99a6281dafcfb12ed279e63e8ca77053e9.tar.xz gsoc2013-empathy-92d12a99a6281dafcfb12ed279e63e8ca77053e9.tar.zst gsoc2013-empathy-92d12a99a6281dafcfb12ed279e63e8ca77053e9.zip |
Partly fix INCOMING calls
svn path=/trunk/; revision=1023
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tp-call.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c index a51ded459..73ec8e992 100644 --- a/libempathy/empathy-tp-call.c +++ b/libempathy/empathy-tp-call.c @@ -291,34 +291,24 @@ tp_call_member_added_cb (EmpathyTpGroup *group, { EmpathyTpCallPriv *priv = GET_PRIV (call); - if (priv->status == EMPATHY_TP_CALL_STATUS_PENDING && - ((priv->is_incoming && contact != priv->contact) || - (!priv->is_incoming && contact == priv->contact))) - { - priv->status = EMPATHY_TP_CALL_STATUS_ACCEPTED; - g_object_notify (G_OBJECT (call), "status"); - } -} - -static void -tp_call_local_pending_cb (EmpathyTpGroup *group, - EmpathyContact *contact, - EmpathyContact *actor, - guint reason, - const gchar *message, - EmpathyTpCall *call) -{ - EmpathyTpCallPriv *priv = GET_PRIV (call); - if (!priv->contact && !empathy_contact_is_user (contact)) { priv->contact = g_object_ref (contact); priv->is_incoming = TRUE; priv->status = EMPATHY_TP_CALL_STATUS_PENDING; + tp_call_request_streams (call); g_object_notify (G_OBJECT (call), "is-incoming"); g_object_notify (G_OBJECT (call), "contact"); g_object_notify (G_OBJECT (call), "status"); } + + if (priv->status == EMPATHY_TP_CALL_STATUS_PENDING && + ((priv->is_incoming && contact != priv->contact) || + (!priv->is_incoming && contact == priv->contact))) + { + priv->status = EMPATHY_TP_CALL_STATUS_ACCEPTED; + g_object_notify (G_OBJECT (call), "status"); + } } static void @@ -510,8 +500,6 @@ tp_call_constructor (GType type, g_signal_connect (priv->group, "member-added", G_CALLBACK (tp_call_member_added_cb), call); - g_signal_connect (priv->group, "local-pending", - G_CALLBACK (tp_call_local_pending_cb), call); g_signal_connect (priv->group, "remote-pending", G_CALLBACK (tp_call_remote_pending_cb), call); @@ -769,7 +757,6 @@ empathy_tp_call_add_output_video (EmpathyTpCall *call, EmpathyTpCallPriv *priv = GET_PRIV (call); g_return_if_fail (EMPATHY_IS_TP_CALL (call)); - g_return_if_fail (priv->status != EMPATHY_TP_CALL_STATUS_CLOSED); empathy_debug (DEBUG_DOMAIN, "Adding output video - socket: %d", output_video_socket_id); @@ -808,7 +795,6 @@ empathy_tp_call_mute_output (EmpathyTpCall *call, EmpathyTpCallPriv *priv = GET_PRIV (call); g_return_if_fail (EMPATHY_IS_TP_CALL (call)); - g_return_if_fail (priv->status != EMPATHY_TP_CALL_STATUS_CLOSED); empathy_debug (DEBUG_DOMAIN, "Setting output mute: %d", is_muted); @@ -827,7 +813,6 @@ empathy_tp_call_mute_input (EmpathyTpCall *call, EmpathyTpCallPriv *priv = GET_PRIV (call); g_return_if_fail (EMPATHY_IS_TP_CALL (call)); - g_return_if_fail (priv->status != EMPATHY_TP_CALL_STATUS_CLOSED); empathy_debug (DEBUG_DOMAIN, "Setting input mute: %d", is_muted); |