]> git.0d.be Git - empathy.git/commitdiff
Don't return the handler, so we can unref it after signalling
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 3 Feb 2009 09:03:42 +0000 (09:03 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 3 Feb 2009 09:03:42 +0000 (09:03 +0000)
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
svn path=/trunk/; revision=2398

libempathy/empathy-call-factory.c
libempathy/empathy-call-factory.h

index 9e7272409535ae2f72e55bebef0299467ad6904d..565f1d03fbc052e5f77dc373276c9a529cb73d43 100644 (file)
@@ -141,32 +141,32 @@ empathy_call_factory_get (void)
   return EMPATHY_CALL_FACTORY (call_factory);
 }
 
   return EMPATHY_CALL_FACTORY (call_factory);
 }
 
-EmpathyCallHandler *
+void
 empathy_call_factory_new_call (EmpathyCallFactory *factory,
   EmpathyContact *contact)
 {
   EmpathyCallHandler *handler;
 
 empathy_call_factory_new_call (EmpathyCallFactory *factory,
   EmpathyContact *contact)
 {
   EmpathyCallHandler *handler;
 
-  g_return_val_if_fail (factory != NULL, NULL);
-  g_return_val_if_fail (contact != NULL, NULL);
+  g_return_if_fail (factory != NULL);
+  g_return_if_fail (contact != NULL);
 
   handler = empathy_call_handler_new_for_contact (contact);
 
   g_signal_emit (G_OBJECT (factory), signals[NEW_CALL_HANDLER], 0,
     handler, TRUE);
 
 
   handler = empathy_call_handler_new_for_contact (contact);
 
   g_signal_emit (G_OBJECT (factory), signals[NEW_CALL_HANDLER], 0,
     handler, TRUE);
 
-  return handler;
+  g_object_unref (handler);
 }
 
 }
 
-EmpathyCallHandler *
+void
 empathy_call_factory_claim_channel (EmpathyCallFactory *factory,
   EmpathyDispatchOperation *operation)
 {
   EmpathyCallHandler *handler;
   EmpathyTpCall *call;
 
 empathy_call_factory_claim_channel (EmpathyCallFactory *factory,
   EmpathyDispatchOperation *operation)
 {
   EmpathyCallHandler *handler;
   EmpathyTpCall *call;
 
-  g_return_val_if_fail (factory != NULL, NULL);
-  g_return_val_if_fail (operation != NULL, NULL);
+  g_return_if_fail (factory != NULL);
+  g_return_if_fail (operation != NULL);
 
   call = EMPATHY_TP_CALL (
     empathy_dispatch_operation_get_channel_wrapper (operation));
 
   call = EMPATHY_TP_CALL (
     empathy_dispatch_operation_get_channel_wrapper (operation));
@@ -178,6 +178,6 @@ empathy_call_factory_claim_channel (EmpathyCallFactory *factory,
   g_signal_emit (G_OBJECT (factory), signals[NEW_CALL_HANDLER], 0,
     handler, FALSE);
 
   g_signal_emit (G_OBJECT (factory), signals[NEW_CALL_HANDLER], 0,
     handler, FALSE);
 
-  return handler;
+  g_object_unref (handler);
 }
 
 }
 
index 36866e7433754e4e95f1fc21f8ad33a87b03ef0a..28b3f0c3e26f4fdd35a88637d671615a4f319296 100644 (file)
@@ -63,11 +63,11 @@ EmpathyCallFactory *empathy_call_factory_initialise (void);
 
 EmpathyCallFactory *empathy_call_factory_get (void);
 
 
 EmpathyCallFactory *empathy_call_factory_get (void);
 
-EmpathyCallHandler *empathy_call_factory_new_call (
-  EmpathyCallFactory *factory, EmpathyContact *contact);
+void empathy_call_factory_new_call (EmpathyCallFactory *factory,
+  EmpathyContact *contact);
 
 
-EmpathyCallHandler *empathy_call_factory_claim_channel (
-  EmpathyCallFactory *factory, EmpathyDispatchOperation *operation);
+void empathy_call_factory_claim_channel (EmpathyCallFactory *factory,
+  EmpathyDispatchOperation *operation);
 
 G_END_DECLS
 
 
 G_END_DECLS