diff options
author | Pekka Pessi <Pekka.Pessi@nokia.com> | 2011-02-03 19:04:20 +0200 |
---|---|---|
committer | Pekka Pessi <Pekka.Pessi@nokia.com> | 2011-02-07 22:00:57 +0200 |
commit | f8362aa74b63bab3b1dc8b9b6ab2076fe764908c (patch) | |
tree | 8676f6bb52381b4a9b47b8ab9445934b2fab18ff | |
parent | 3d4d139d64c1473a42986655e5930175d30bfa70 (diff) |
tpsip_conn_heartbeat_init: use "sofia-root" propertytpsip-managers
-rw-r--r-- | src/sip-connection-helpers.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sip-connection-helpers.c b/src/sip-connection-helpers.c index a4de677..95de5ba 100644 --- a/src/sip-connection-helpers.c +++ b/src/sip-connection-helpers.c @@ -735,6 +735,7 @@ tpsip_conn_heartbeat_init (TpsipConnection *self) TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self); int wait_id; int reference_interval = 0; + su_root_t *root = NULL; g_assert (priv->heartbeat == NULL); @@ -755,7 +756,9 @@ tpsip_conn_heartbeat_init (TpsipConnection *self) tpsip_log (DEBUG_FLAG, G_LOG_LEVEL_CRITICAL, "could not create a wait object"); - wait_id = su_root_register (priv->sofia_root, + g_object_get (self, "sofia-root", &root, NULL); + + wait_id = su_root_register (root, priv->heartbeat_wait, heartbeat_wakeup, self, 0); g_return_if_fail (wait_id > 0); @@ -779,11 +782,14 @@ tpsip_conn_heartbeat_shutdown (TpsipConnection *self) { #ifdef HAVE_LIBIPHB TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self); + su_root_t *root = NULL; if (priv->heartbeat_wait_id == 0) return; - su_root_deregister (priv->sofia_root, priv->heartbeat_wait_id); + g_object_get (self, "sofia-root", &root, NULL); + + su_root_deregister (root, priv->heartbeat_wait_id); priv->heartbeat_wait_id = 0; su_wait_destroy (priv->heartbeat_wait); |