summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-02-20 11:54:10 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-02-20 15:18:16 +0100
commite266f8cdbea6bc27bcd47783c5f6e56ff62cad04 (patch)
treeb9d0866fa93a47cc591c4183112aa655d7d54a99
parent40e2b5dad74b48f12b9004428b51d1bb557502c8 (diff)
tp_connection_get_detailed_error() has been renamed
-rw-r--r--src/mcd-account.c19
-rw-r--r--src/mcd-connection.c18
2 files changed, 29 insertions, 8 deletions
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 13d5306f..28323913 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -5014,8 +5014,9 @@ mcd_account_connection_ready_cb (McdAccount *account,
TpConnection *tp_connection;
TpConnectionStatus status;
TpConnectionStatusReason reason;
- const gchar *dbus_error = NULL;
- const GHashTable *details = NULL;
+ gchar *dbus_error = NULL;
+ GVariant *details = NULL;
+ GHashTable *details_asv;
g_return_if_fail (MCD_IS_ACCOUNT (account));
g_return_if_fail (connection == priv->connection);
@@ -5028,9 +5029,19 @@ mcd_account_connection_ready_cb (McdAccount *account,
TP_CONNECTION_FEATURE_CONNECTED));
status = tp_connection_get_status (tp_connection, &reason);
- dbus_error = tp_connection_get_detailed_error (tp_connection, &details);
+ dbus_error = tp_connection_dup_detailed_error (tp_connection, &details);
+
+ if (details != NULL)
+ details_asv = tp_asv_from_vardict (details);
+ else
+ details_asv = tp_asv_new (NULL, NULL);
+
_mcd_account_set_connection_status (account, status, reason,
- tp_connection, dbus_error, details);
+ tp_connection, dbus_error, details_asv);
+ g_free (dbus_error);
+ if (details != NULL)
+ g_variant_unref (details);
+ g_hash_table_unref (details_asv);
tp_g_signal_connect_object (tp_connection, "notify::self-contact",
G_CALLBACK (mcd_account_self_contact_changed_cb), account,
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index e2b60dd6..4838025f 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -1468,18 +1468,28 @@ _mcd_connection_release_tp_connection (McdConnection *connection,
}
else
{
- const gchar *dbus_error = NULL;
- const GHashTable *details = NULL;
+ gchar *dbus_error = NULL;
+ GHashTable *details_asv = NULL;
if (priv->tp_conn != NULL)
{
- dbus_error = tp_connection_get_detailed_error (priv->tp_conn,
+ GVariant *details;
+
+ dbus_error = tp_connection_dup_detailed_error (priv->tp_conn,
&details);
+
+ details_asv = tp_asv_from_vardict (details);
+ g_variant_unref (details);
}
g_signal_emit (connection, signals[CONNECTION_STATUS_CHANGED], 0,
TP_CONNECTION_STATUS_DISCONNECTED,
- priv->abort_reason, priv->tp_conn, dbus_error, details);
+ priv->abort_reason, priv->tp_conn, dbus_error,
+ details_asv);
+
+ g_free (dbus_error);
+ if (details_asv != NULL)
+ g_hash_table_unref (details_asv);
}
if (priv->tp_conn)