empathy r2524 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2524 - trunk/libempathy
- Date: Fri, 20 Feb 2009 22:51:11 +0000 (UTC)
Author: xclaesse
Date: Fri Feb 20 22:51:11 2009
New Revision: 2524
URL: http://svn.gnome.org/viewvc/empathy?rev=2524&view=rev
Log:
Handle re-dispatching channels in approving state
when a channel is in approving state and the user does a request which turns
out to be satisfied by that channel it automagically gets approved. Correctly
cope with this and don't try to start dispatching for it again. Fixes bug
Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>
Modified:
trunk/libempathy/empathy-dispatcher.c
Modified: trunk/libempathy/empathy-dispatcher.c
==============================================================================
--- trunk/libempathy/empathy-dispatcher.c (original)
+++ trunk/libempathy/empathy-dispatcher.c Fri Feb 20 22:51:11 2009
@@ -1120,11 +1120,21 @@
request_data->operation = operation;
- /* (pre)-approve this right away as we requested it */
+ /* (pre)-approve this right away as we requested it
+ * This might cause the channel to be claimed, in which case the operation
+ * will disappear. So ref it, and check the status before starting the
+ * dispatching */
+
+ g_object_ref (operation);
empathy_dispatch_operation_approve (operation);
- dispatcher_start_dispatching (request_data->dispatcher, operation,
- conn_data);
+ if (empathy_dispatch_operation_get_status (operation) <
+ EMPATHY_DISPATCHER_OPERATION_STATE_APPROVING)
+ dispatcher_start_dispatching (request_data->dispatcher, operation,
+ conn_data);
+
+ g_object_unref (operation);
+
out:
dispatcher_flush_outstanding_operations (request_data->dispatcher,
conn_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]