summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Dasmohapatra <vivek@collabora.co.uk>2011-05-20 20:33:58 +0100
committerVivek Dasmohapatra <vivek@collabora.co.uk>2011-05-24 15:18:24 +0100
commit232cc604d7827c51456534976cf8c69446b3418b (patch)
treeece6083fdf9e63a84dddda0c74e4cc6dd620fdb8
parent0285a8ce6940868d91b86c9de23b141a85ff47a1 (diff)
downloadtelepathy-mission-control-232cc604d7827c51456534976cf8c69446b3418b.tar.gz
Catch the case where there's a hole in our logic and an internal request hasn't been cleaned up properly
-rw-r--r--src/request.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/request.c b/src/request.c
index 6b18e81e..0abef720 100644
--- a/src/request.c
+++ b/src/request.c
@@ -277,6 +277,15 @@ _mcd_request_dispose (GObject *object)
DEBUG ("%p", object);
+ /* shouldn't ever actually get this far with a blocked account, *
+ * but we have to clear the lock if we do or we'll deadlock */
+ if (_mcd_request_is_internal (self) && self->account != NULL)
+ {
+ const gchar *path = mcd_account_get_object_path (self->account);
+ _mcd_request_unblock_account (path);
+ g_warning ("internal request disposed without being handled or failed");
+ }
+
tp_clear_object (&self->account);
tp_clear_object (&self->clients);
tp_clear_object (&self->predicted_handler);