summaryrefslogtreecommitdiff
path: root/examples/cm/echo-message-parts/conn.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cm/echo-message-parts/conn.c')
-rw-r--r--examples/cm/echo-message-parts/conn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/cm/echo-message-parts/conn.c b/examples/cm/echo-message-parts/conn.c
index 7e6e4c0ec..d93229f15 100644
--- a/examples/cm/echo-message-parts/conn.c
+++ b/examples/cm/echo-message-parts/conn.c
@@ -133,14 +133,17 @@ start_connecting (TpBaseConnection *conn,
ExampleEcho2Connection *self = EXAMPLE_ECHO_2_CONNECTION (conn);
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn,
TP_HANDLE_TYPE_CONTACT);
+ TpHandle self_handle;
/* In a real connection manager we'd ask the underlying implementation to
* start connecting, then go to state CONNECTED when finished, but here
* we can do it immediately. */
- conn->self_handle = tp_handle_ensure (contact_repo, self->priv->account,
+ self_handle = tp_handle_ensure (contact_repo, self->priv->account,
NULL, NULL);
+ tp_base_connection_set_self_handle (conn, self_handle);
+
tp_base_connection_change_status (conn, TP_CONNECTION_STATUS_CONNECTED,
TP_CONNECTION_STATUS_REASON_REQUESTED);