]> git.0d.be Git - empathy.git/commitdiff
dispatch-operation: factor out channel_wrapper_ready
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 7 Jun 2010 10:24:06 +0000 (12:24 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 7 Jun 2010 10:26:05 +0000 (12:26 +0200)
libempathy/empathy-dispatch-operation.c

index f6cc0d6ef0e25c4d39b022d73dec79541979fce5..68143c55b5e0d7faad0abdeb3b667ada68250f57 100644 (file)
@@ -432,6 +432,18 @@ empathy_dispatch_operation_set_status (EmpathyDispatchOperation *self,
     }
 }
 
+static void
+channel_wrapper_ready (EmpathyDispatchOperation *self)
+{
+  EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
+
+  g_signal_handler_disconnect (priv->channel_wrapper, priv->ready_handler);
+  priv->ready_handler = 0;
+
+  empathy_dispatch_operation_set_status (self,
+    EMPATHY_DISPATCHER_OPERATION_STATE_PENDING);
+}
+
 static void
 empathy_dispatcher_operation_tp_chat_ready_cb (GObject *object,
   GParamSpec *spec, gpointer user_data)
@@ -442,11 +454,7 @@ empathy_dispatcher_operation_tp_chat_ready_cb (GObject *object,
   if (!empathy_tp_chat_is_ready (EMPATHY_TP_CHAT (priv->channel_wrapper)))
     return;
 
-  g_signal_handler_disconnect (priv->channel_wrapper, priv->ready_handler);
-  priv->ready_handler = 0;
-
-  empathy_dispatch_operation_set_status (self,
-    EMPATHY_DISPATCHER_OPERATION_STATE_PENDING);
+  channel_wrapper_ready (self);
 }
 
 static void