diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2008-08-29 16:00:28 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2008-08-29 16:32:18 +0100 |
commit | cefc2b085e80de168abc1e5eef3e867be96dfe5f (patch) | |
tree | f22cdd223716d9eaf9b5b7cfe2dfb871f1fb7ac9 /src/idle-connection.c | |
parent | 4121b3a3ffcb83f1ecd7797b9e764a9898846c0e (diff) |
Change self-handle using tp_base_connection_set_self_handle
Diffstat (limited to 'src/idle-connection.c')
-rw-r--r-- | src/idle-connection.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/idle-connection.c b/src/idle-connection.c index 4f878f3..ab5711a 100644 --- a/src/idle-connection.c +++ b/src/idle-connection.c @@ -695,11 +695,7 @@ static IdleParserHandlerResult _nick_handler(IdleParser *parser, IdleParserMessa return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; if (old_handle == conn->parent.self_handle) { - TpHandleRepoIface *handles = tp_base_connection_get_handles(TP_BASE_CONNECTION(conn), TP_HANDLE_TYPE_CONTACT); - - tp_handle_unref(handles, conn->parent.self_handle); - conn->parent.self_handle = new_handle; - tp_handle_ref(handles, new_handle); + tp_base_connection_set_self_handle(TP_BASE_CONNECTION(conn), new_handle); } idle_svc_connection_interface_renaming_emit_renamed(IDLE_SVC_CONNECTION_INTERFACE_RENAMING(conn), old_handle, new_handle); @@ -751,9 +747,7 @@ static IdleParserHandlerResult _welcome_handler(IdleParser *parser, IdleParserMe TpHandle handle = g_value_get_uint(g_value_array_get_nth(args, 0)); TpHandleRepoIface *handles = tp_base_connection_get_handles(TP_BASE_CONNECTION(conn), TP_HANDLE_TYPE_CONTACT); - conn->parent.self_handle = handle; - tp_handle_ref(handles, handle); - g_assert(tp_handle_is_valid(handles, handle, NULL)); + tp_base_connection_set_self_handle(TP_BASE_CONNECTION(conn), handle); connection_connect_cb(conn, TRUE, 0); |