aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-03-04 01:34:25 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-03-04 01:34:25 +0800
commit69c2d2a857b4ee4b9316fe27d382b9479f8c7e35 (patch)
tree916b79a067f8a63794b344c208a7086464f713f1 /src
parent8275ca48c1e240845ef950094e92061f3944ce81 (diff)
downloadgsoc2013-empathy-69c2d2a857b4ee4b9316fe27d382b9479f8c7e35.tar
gsoc2013-empathy-69c2d2a857b4ee4b9316fe27d382b9479f8c7e35.tar.gz
gsoc2013-empathy-69c2d2a857b4ee4b9316fe27d382b9479f8c7e35.tar.bz2
gsoc2013-empathy-69c2d2a857b4ee4b9316fe27d382b9479f8c7e35.tar.lz
gsoc2013-empathy-69c2d2a857b4ee4b9316fe27d382b9479f8c7e35.tar.xz
gsoc2013-empathy-69c2d2a857b4ee4b9316fe27d382b9479f8c7e35.tar.zst
gsoc2013-empathy-69c2d2a857b4ee4b9316fe27d382b9479f8c7e35.zip
Put locks around timer_id
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2556
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 7ad016f84..0c10c8d5c 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -567,9 +567,16 @@ empathy_call_window_channel_closed_cb (TfChannel *channel, gpointer user_data)
EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
EmpathyCallWindowPriv *priv = GET_PRIV (self);
+ g_mutex_lock (priv->lock);
+
g_timer_stop (priv->timer);
- g_source_remove (priv->timer_id);
+
+ if (priv->timer_id != 0)
+ g_source_remove (priv->timer_id);
priv->timer_id = 0;
+
+ g_mutex_unlock (priv->lock);
+
empathy_call_window_status_message (self, _("Disconnected"));
gtk_widget_set_sensitive (priv->camera_button, FALSE);
@@ -663,11 +670,14 @@ empathy_call_window_connected (gpointer user_data)
g_object_unref (call);
+ g_mutex_lock (priv->lock);
+
priv->timer_id = g_timeout_add_seconds (1,
empathy_call_window_update_timer, self);
+ g_mutex_unlock (priv->lock);
+
empathy_call_window_update_timer (self);
- gdk_threads_leave ();
return FALSE;
}