telepathy-glib: TpBaseClient: Ensure that the Connection knows its Account early
Xavier Claessens
xclaesse at kemper.freedesktop.org
Thu Jul 5 01:26:36 PDT 2012
Module: telepathy-glib
Branch: master
Commit: ac0a38eb86993bb2b223f08d3402ff9e1d4be27a
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=ac0a38eb86993bb2b223f08d3402ff9e1d4be27a
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Wed Jun 27 11:18:17 2012 +0200
TpBaseClient: Ensure that the Connection knows its Account early
This fixes a crash in empathy-chat:
https://bugs.freedesktop.org/show_bug.cgi?id=51444
---
telepathy-glib/base-client.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c
index 938d94a..dfdda15 100644
--- a/telepathy-glib/base-client.c
+++ b/telepathy-glib/base-client.c
@@ -199,6 +199,7 @@
#include <telepathy-glib/util.h>
#define DEBUG_FLAG TP_DEBUG_CLIENT
+#include "telepathy-glib/connection-internal.h"
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/deprecated-internal.h"
#include "telepathy-glib/simple-client-factory-internal.h"
@@ -1689,6 +1690,11 @@ ensure_account_connection_channels (TpBaseClient *self,
if (*connection == NULL)
goto error;
+ /* fdo#51444: Custom TpChannel subclasses constructors may assume that the
+ * Connection already knows its Account. If we don't do it here, it will be
+ * done only when TP_ACCOUNT_FEATURE_CORE gets prepared on the Account. */
+ _tp_connection_set_account (*connection, *account);
+
if (channels_arr->len == 0)
{
g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
More information about the telepathy-commits
mailing list