summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2012-05-22 18:02:46 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2012-05-23 15:26:07 +0300
commit510219be635008efb62e7ea80a1584763ee6fe1e (patch)
tree72cf582eb2cf1cca485860460019d8c805c33b5c
parent7bd28f2d29a6aaa656de7ff9291698a713c5c61f (diff)
tests: Remove all occurencies of tp_handle_ref/unref.
These methods are now deprecated and they have been no-op for a while, so it is safe to simply remove them.
-rw-r--r--tests/dbus/account-channel-dispatcher.cpp2
-rw-r--r--tests/dbus/chan-conference.cpp4
-rw-r--r--tests/dbus/client-factories.cpp2
-rw-r--r--tests/dbus/client.cpp2
-rw-r--r--tests/dbus/contact-messenger.cpp6
-rw-r--r--tests/dbus/simple-observer.cpp2
-rw-r--r--tests/dbus/stream-tube-chan.cpp5
-rw-r--r--tests/dbus/stream-tube-handlers.cpp5
-rw-r--r--tests/dbus/text-chan.cpp2
-rw-r--r--tests/lib/glib/callable/media-channel.c8
-rw-r--r--tests/lib/glib/callable/media-stream.c16
-rw-r--r--tests/lib/glib/contact-list-manager.c2
-rw-r--r--tests/lib/glib/contactlist/contact-list-manager.c16
-rw-r--r--tests/lib/glib/contactlist/contact-list.c6
-rw-r--r--tests/lib/glib/contactlist2/contact-list.c13
-rw-r--r--tests/lib/glib/csh/room.c23
-rw-r--r--tests/lib/glib/echo/chan.c22
-rw-r--r--tests/lib/glib/echo2/chan.c24
-rw-r--r--tests/lib/glib/future/conn-addressing/conn.c2
-rw-r--r--tests/lib/glib/simple-conn.c3
-rw-r--r--tests/lib/glib/textchan-null.c5
21 files changed, 1 insertions, 169 deletions
diff --git a/tests/dbus/account-channel-dispatcher.cpp b/tests/dbus/account-channel-dispatcher.cpp
index bf3e8f8e..510a1636 100644
--- a/tests/dbus/account-channel-dispatcher.cpp
+++ b/tests/dbus/account-channel-dispatcher.cpp
@@ -1069,8 +1069,6 @@ void TestAccountChannelDispatcher::testCreateAndHandleChannelHandledAgain()
"handle", handle,
NULL));
- tp_handle_unref(contactRepo, handle);
-
PendingChannel *pcOut = 0;
TEST_CREATE_ENSURE_AND_HANDLE_CHANNEL(createAndHandleChannel, false, false, true, "", 0, &pcOut);
diff --git a/tests/dbus/chan-conference.cpp b/tests/dbus/chan-conference.cpp
index c1f36e15..830fa970 100644
--- a/tests/dbus/chan-conference.cpp
+++ b/tests/dbus/chan-conference.cpp
@@ -136,10 +136,6 @@ void TestConferenceChan::initTestCase()
"initial-channels", initialChannels,
NULL));
- tp_handle_unref(mContactRepo, handle1);
- tp_handle_unref(mContactRepo, handle2);
- tp_handle_unref(mContactRepo, handle3);
-
g_ptr_array_foreach(initialChannels, (GFunc) g_free, NULL);
g_ptr_array_free(initialChannels, TRUE);
}
diff --git a/tests/dbus/client-factories.cpp b/tests/dbus/client-factories.cpp
index 87549ee5..1f7b7fa9 100644
--- a/tests/dbus/client-factories.cpp
+++ b/tests/dbus/client-factories.cpp
@@ -533,8 +533,6 @@ void TestClientFactories::initTestCase()
"handle", handle,
NULL));
- tp_handle_unref(mContactRepo, handle);
-
mClientRegistrar = ClientRegistrar::create(mAM);
// Fake ChannelRequest
diff --git a/tests/dbus/client.cpp b/tests/dbus/client.cpp
index 2de25ca2..20729eb3 100644
--- a/tests/dbus/client.cpp
+++ b/tests/dbus/client.cpp
@@ -468,8 +468,6 @@ void TestClient::initTestCase()
"handle", handle,
NULL));
- tp_handle_unref(mContactRepo, handle);
-
mClientRegistrar = ClientRegistrar::create();
QDBusConnection bus = mClientRegistrar->dbusConnection();
diff --git a/tests/dbus/contact-messenger.cpp b/tests/dbus/contact-messenger.cpp
index 973e6b39..446f79eb 100644
--- a/tests/dbus/contact-messenger.cpp
+++ b/tests/dbus/contact-messenger.cpp
@@ -419,8 +419,6 @@ void TestContactMessenger::initTestCase()
SIGNAL(finished(Tp::PendingOperation *)),
SLOT(expectSuccessfulCall(Tp::PendingOperation *))));
QCOMPARE(mLoop->exec(), 0);
-
- tp_handle_unref(mContactRepo, handle);
}
void TestContactMessenger::init()
@@ -538,8 +536,6 @@ void TestContactMessenger::testReceived()
tp_message_mixin_take_received(G_OBJECT(mMessagesChanService), msg);
- tp_handle_unref(mContactRepo, handle);
-
while (!mGotMessageReceived) {
mLoop->processEvents();
}
@@ -580,8 +576,6 @@ void TestContactMessenger::testReceivedFromContact()
tp_message_mixin_take_received(G_OBJECT(mMessagesChanService), msg);
- tp_handle_unref(mContactRepo, handle);
-
while (!mGotMessageReceived) {
mLoop->processEvents();
}
diff --git a/tests/dbus/simple-observer.cpp b/tests/dbus/simple-observer.cpp
index 35ce7092..5543157b 100644
--- a/tests/dbus/simple-observer.cpp
+++ b/tests/dbus/simple-observer.cpp
@@ -349,8 +349,6 @@ void TestSimpleObserver::initTestCase()
g_free(connName);
g_free(connPath);
-
- tp_handle_unref(contactRepo, handle);
}
}
diff --git a/tests/dbus/stream-tube-chan.cpp b/tests/dbus/stream-tube-chan.cpp
index 84ded4e5..ba6050fa 100644
--- a/tests/dbus/stream-tube-chan.cpp
+++ b/tests/dbus/stream-tube-chan.cpp
@@ -300,11 +300,6 @@ void TestStreamTubeChan::createTubeChannel(bool requested,
g_hash_table_unref(props);
g_hash_table_unref(sockets);
-
- if (withContact)
- tp_handle_unref(contactRepo, handle);
- else
- tp_handle_unref(roomRepo, handle);
}
void TestStreamTubeChan::initTestCase()
diff --git a/tests/dbus/stream-tube-handlers.cpp b/tests/dbus/stream-tube-handlers.cpp
index 21e3c2b8..ebc9a6ea 100644
--- a/tests/dbus/stream-tube-handlers.cpp
+++ b/tests/dbus/stream-tube-handlers.cpp
@@ -408,11 +408,6 @@ QPair<QString, QVariantMap> TestStreamTubeHandlers::createTubeChannel(bool reque
"initiator-handle", alfHandle,
NULL)));
- if (handleType == HandleTypeContact)
- tp_handle_unref(contactRepo, handle);
- else
- tp_handle_unref(roomRepo, handle);
-
return qMakePair(chanPath, chanProps);
}
diff --git a/tests/dbus/text-chan.cpp b/tests/dbus/text-chan.cpp
index 9fb8a4e5..51aeaa76 100644
--- a/tests/dbus/text-chan.cpp
+++ b/tests/dbus/text-chan.cpp
@@ -158,8 +158,6 @@ void TestTextChan::initTestCase()
"object-path", chanPath.data(),
"handle", handle,
NULL));
-
- tp_handle_unref(mContactRepo, handle);
}
void TestTextChan::init()
diff --git a/tests/lib/glib/callable/media-channel.c b/tests/lib/glib/callable/media-channel.c
index 712f93ad..17872f8e 100644
--- a/tests/lib/glib/callable/media-channel.c
+++ b/tests/lib/glib/callable/media-channel.c
@@ -167,9 +167,6 @@ constructed (GObject *object)
if (chain_up != NULL)
chain_up (object);
- tp_handle_ref (contact_repo, self->priv->handle);
- tp_handle_ref (contact_repo, self->priv->initiator);
-
tp_dbus_daemon_register_object (
tp_base_connection_get_dbus_daemon (self->priv->conn),
self->priv->object_path, self);
@@ -490,11 +487,6 @@ static void
finalize (GObject *object)
{
ExampleCallableMediaChannel *self = EXAMPLE_CALLABLE_MEDIA_CHANNEL (object);
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
-
- tp_handle_unref (contact_handles, self->priv->handle);
- tp_handle_unref (contact_handles, self->priv->initiator);
g_free (self->priv->object_path);
diff --git a/tests/lib/glib/callable/media-stream.c b/tests/lib/glib/callable/media-stream.c
index 4c19e108..7be3ba0f 100644
--- a/tests/lib/glib/callable/media-stream.c
+++ b/tests/lib/glib/callable/media-stream.c
@@ -116,14 +116,6 @@ constructed (GObject *object)
NULL);
self->priv->call_terminated_id = g_signal_connect (self->priv->channel,
"call-terminated", G_CALLBACK (call_terminated_cb), self);
-
- if (self->priv->handle != 0)
- {
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
- self->priv->conn, TP_HANDLE_TYPE_CONTACT);
-
- tp_handle_ref (contact_repo, self->priv->handle);
- }
}
static void
@@ -257,17 +249,9 @@ static void
dispose (GObject *object)
{
ExampleCallableMediaStream *self = EXAMPLE_CALLABLE_MEDIA_STREAM (object);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
- self->priv->conn, TP_HANDLE_TYPE_CONTACT);
example_callable_media_stream_close (self);
- if (self->priv->handle != 0)
- {
- tp_handle_unref (contact_repo, self->priv->handle);
- self->priv->handle = 0;
- }
-
if (self->priv->channel != NULL)
{
if (self->priv->call_terminated_id != 0)
diff --git a/tests/lib/glib/contact-list-manager.c b/tests/lib/glib/contact-list-manager.c
index 0da0509b..27a642e6 100644
--- a/tests/lib/glib/contact-list-manager.c
+++ b/tests/lib/glib/contact-list-manager.c
@@ -56,7 +56,6 @@ contact_detail_destroy (gpointer p)
g_free (d->publish_request);
tp_handle_set_destroy (d->groups);
- tp_handle_unref (d->contact_repo, d->handle);
g_slice_free (ContactDetails, d);
}
@@ -84,7 +83,6 @@ ensure_contact (TestContactListManager *self,
d->groups = tp_handle_set_new (self->priv->group_repo);
d->handle = handle;
d->contact_repo = self->priv->contact_repo;
- tp_handle_ref (d->contact_repo, d->handle);
g_hash_table_insert (self->priv->contact_details,
GUINT_TO_POINTER (handle), d);
diff --git a/tests/lib/glib/contactlist/contact-list-manager.c b/tests/lib/glib/contactlist/contact-list-manager.c
index 1be83680..465eadbe 100644
--- a/tests/lib/glib/contactlist/contact-list-manager.c
+++ b/tests/lib/glib/contactlist/contact-list-manager.c
@@ -434,7 +434,6 @@ receive_contact_lists (gpointer p)
d->stored = TRUE;
d->tags = tp_handle_set_new (self->priv->group_repo);
tp_handle_set_add (d->tags, cambridge);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "guillaume@example.com",
NULL, NULL);
@@ -450,7 +449,6 @@ receive_contact_lists (gpointer p)
d->tags = tp_handle_set_new (self->priv->group_repo);
tp_handle_set_add (d->tags, cambridge);
tp_handle_set_add (d->tags, francophones);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "olivier@example.com",
NULL, NULL);
@@ -466,7 +464,6 @@ receive_contact_lists (gpointer p)
d->tags = tp_handle_set_new (self->priv->group_repo);
tp_handle_set_add (d->tags, montreal);
tp_handle_set_add (d->tags, francophones);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "travis@example.com",
NULL, NULL);
@@ -477,7 +474,6 @@ receive_contact_lists (gpointer p)
d->subscribe = TRUE;
d->publish = TRUE;
d->stored = TRUE;
- tp_handle_unref (self->priv->contact_repo, handle);
tp_group_mixin_change_members ((GObject *) subscribe, "",
set, NULL, NULL, NULL,
@@ -517,7 +513,6 @@ receive_contact_lists (gpointer p)
d->tags = tp_handle_set_new (self->priv->group_repo);
tp_handle_set_add (d->tags, cambridge);
tp_handle_set_add (d->tags, francophones);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "helen@example.com",
NULL, NULL);
@@ -530,7 +525,6 @@ receive_contact_lists (gpointer p)
d->stored = TRUE;
d->tags = tp_handle_set_new (self->priv->group_repo);
tp_handle_set_add (d->tags, cambridge);
- tp_handle_unref (self->priv->contact_repo, handle);
tp_group_mixin_change_members ((GObject *) subscribe, "",
NULL, NULL, NULL, set,
@@ -559,7 +553,6 @@ receive_contact_lists (gpointer p)
d->alias = g_strdup ("Wim");
d->publish_requested = TRUE;
d->stored = TRUE;
- tp_handle_unref (self->priv->contact_repo, handle);
set = tp_intset_new_containing (handle);
tp_group_mixin_change_members ((GObject *) publish,
@@ -580,7 +573,6 @@ receive_contact_lists (gpointer p)
d->alias = g_strdup ("Christian");
d->publish_requested = TRUE;
d->stored = TRUE;
- tp_handle_unref (self->priv->contact_repo, handle);
set = tp_intset_new_containing (handle);
tp_group_mixin_change_members ((GObject *) publish,
@@ -605,7 +597,6 @@ receive_contact_lists (gpointer p)
g_free (d->alias);
d->alias = g_strdup ("Bill");
d->blocked = TRUE;
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "steve@example.com",
NULL, NULL);
@@ -614,7 +605,6 @@ receive_contact_lists (gpointer p)
g_free (d->alias);
d->alias = g_strdup ("Steve");
d->blocked = TRUE;
- tp_handle_unref (self->priv->contact_repo, handle);
tp_group_mixin_change_members ((GObject *) deny, "",
set, NULL, NULL, NULL,
@@ -646,10 +636,6 @@ receive_contact_lists (gpointer p)
tp_intset_destroy (cam_set);
tp_intset_destroy (mtl_set);
- tp_handle_unref (self->priv->group_repo, cambridge);
- tp_handle_unref (self->priv->group_repo, montreal);
- tp_handle_unref (self->priv->group_repo, francophones);
-
/* Now we've received the roster, we can satisfy all the queued requests */
example_contact_list_manager_foreach_channel ((TpChannelManager *) self,
@@ -1180,7 +1166,6 @@ self_and_contact_new (ExampleContactListManager *self,
ret->self = g_object_ref (self);
ret->contact = contact;
- tp_handle_ref (self->priv->contact_repo, contact);
return ret;
}
@@ -1189,7 +1174,6 @@ self_and_contact_destroy (gpointer p)
{
SelfAndContact *s = p;
- tp_handle_unref (s->self->priv->contact_repo, s->contact);
g_object_unref (s->self);
g_slice_free (SelfAndContact, s);
}
diff --git a/tests/lib/glib/contactlist/contact-list.c b/tests/lib/glib/contactlist/contact-list.c
index 44bcf16d..28a539ef 100644
--- a/tests/lib/glib/contactlist/contact-list.c
+++ b/tests/lib/glib/contactlist/contact-list.c
@@ -120,8 +120,6 @@ constructed (GObject *object)
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
(self->priv->conn, TP_HANDLE_TYPE_CONTACT);
TpHandle self_handle = self->priv->conn->self_handle;
- TpHandleRepoIface *handle_repo = tp_base_connection_get_handles
- (self->priv->conn, self->priv->handle_type);
if (chain_up != NULL)
chain_up (object);
@@ -133,7 +131,6 @@ constructed (GObject *object)
tp_base_connection_get_dbus_daemon (self->priv->conn),
self->priv->object_path, self);
- tp_handle_ref (handle_repo, self->priv->handle);
tp_group_mixin_init (object, G_STRUCT_OFFSET (ExampleContactListBase, group),
contact_repo, self_handle);
/* Both the subclasses have full support for telepathy-spec 0.17.6. */
@@ -345,10 +342,7 @@ static void
finalize (GObject *object)
{
ExampleContactListBase *self = EXAMPLE_CONTACT_LIST_BASE (object);
- TpHandleRepoIface *handle_repo = tp_base_connection_get_handles
- (self->priv->conn, self->priv->handle_type);
- tp_handle_unref (handle_repo, self->priv->handle);
g_free (self->priv->object_path);
tp_group_mixin_finalize (object);
diff --git a/tests/lib/glib/contactlist2/contact-list.c b/tests/lib/glib/contactlist2/contact-list.c
index bdefc149..37d9169a 100644
--- a/tests/lib/glib/contactlist2/contact-list.c
+++ b/tests/lib/glib/contactlist2/contact-list.c
@@ -394,7 +394,6 @@ receive_contact_lists (gpointer p)
d->publish = TRUE;
d->tags = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (d->tags, cambridge, cambridge);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "guillaume@example.com",
NULL, NULL);
@@ -406,7 +405,6 @@ receive_contact_lists (gpointer p)
d->tags = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (d->tags, cambridge, cambridge);
g_hash_table_insert (d->tags, francophones, francophones);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "olivier@example.com",
NULL, NULL);
@@ -418,7 +416,6 @@ receive_contact_lists (gpointer p)
d->tags = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (d->tags, montreal, montreal);
g_hash_table_insert (d->tags, francophones, francophones);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "travis@example.com",
NULL, NULL);
@@ -427,7 +424,6 @@ receive_contact_lists (gpointer p)
d->alias = g_strdup ("Travis");
d->subscribe = TRUE;
d->publish = TRUE;
- tp_handle_unref (self->priv->contact_repo, handle);
/* Add a couple of people whose presence we've requested. They are
* remote-pending in subscribe */
@@ -441,7 +437,6 @@ receive_contact_lists (gpointer p)
d->tags = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (d->tags, cambridge, cambridge);
g_hash_table_insert (d->tags, francophones, francophones);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "helen@example.com",
NULL, NULL);
@@ -451,7 +446,6 @@ receive_contact_lists (gpointer p)
d->subscribe_requested = TRUE;
d->tags = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (d->tags, cambridge, cambridge);
- tp_handle_unref (self->priv->contact_repo, handle);
/* Receive a couple of authorization requests too. These people are
* local-pending in publish; they're not actually on our protocol-level
@@ -462,7 +456,6 @@ receive_contact_lists (gpointer p)
tp_handle_set_add (self->priv->contacts, handle);
g_hash_table_insert (self->priv->publish_requests,
GUINT_TO_POINTER (handle), g_strdup ("I'm more metal than you!"));
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "christian@example.com",
NULL, NULL);
@@ -470,17 +463,14 @@ receive_contact_lists (gpointer p)
g_hash_table_insert (self->priv->publish_requests,
GUINT_TO_POINTER (handle),
g_strdup ("I have some fermented herring for you"));
- tp_handle_unref (self->priv->contact_repo, handle);
/* Add a couple of blocked contacts. */
handle = tp_handle_ensure (self->priv->contact_repo, "bill@example.com",
NULL, NULL);
tp_handle_set_add (self->priv->blocked_contacts, handle);
- tp_handle_unref (self->priv->contact_repo, handle);
handle = tp_handle_ensure (self->priv->contact_repo, "steve@example.com",
NULL, NULL);
tp_handle_set_add (self->priv->blocked_contacts, handle);
- tp_handle_unref (self->priv->contact_repo, handle);
g_hash_table_iter_init (&iter, self->priv->contact_details);
@@ -781,7 +771,7 @@ self_and_contact_new (ExampleContactList *self,
SelfAndContact *ret = g_slice_new0 (SelfAndContact);
ret->self = g_object_ref (self);
- ret->contact = tp_handle_ref (self->priv->contact_repo, contact);
+ ret->contact = contact;
return ret;
}
@@ -790,7 +780,6 @@ self_and_contact_destroy (gpointer p)
{
SelfAndContact *s = p;
- tp_handle_unref (s->self->priv->contact_repo, s->contact);
g_object_unref (s->self);
g_slice_free (SelfAndContact, s);
}
diff --git a/tests/lib/glib/csh/room.c b/tests/lib/glib/csh/room.c
index 963491d3..7796f097 100644
--- a/tests/lib/glib/csh/room.c
+++ b/tests/lib/glib/csh/room.c
@@ -166,7 +166,6 @@ complete_join (ExampleCSHRoomChannel *self)
tp_group_mixin_change_members ((GObject *) self, "", NULL, removed, NULL,
rp, 0, TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED);
- tp_handle_unref (contact_repo, new_self);
tp_intset_destroy (removed);
tp_intset_destroy (rp);
}
@@ -192,15 +191,6 @@ complete_join (ExampleCSHRoomChannel *self)
tp_group_mixin_change_members ((GObject *) self, "", added, NULL, NULL,
NULL, 0, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- tp_handle_unref (contact_repo, alice_local);
- tp_handle_unref (contact_repo, bob_local);
- tp_handle_unref (contact_repo, chris_local);
- tp_handle_unref (contact_repo, anon_local);
-
- tp_handle_unref (contact_repo, alice_global);
- tp_handle_unref (contact_repo, bob_global);
- tp_handle_unref (contact_repo, chris_global);
-
/* now that the dust has settled, we can also invite people */
tp_group_mixin_change_flags ((GObject *) self,
TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_MESSAGE_ADD,
@@ -255,11 +245,6 @@ constructor (GType type,
(self->priv->conn, TP_HANDLE_TYPE_ROOM);
TpHandle self_handle;
- tp_handle_ref (room_repo, self->priv->handle);
-
- if (self->priv->initiator != 0)
- tp_handle_ref (contact_repo, self->priv->initiator);
-
tp_dbus_daemon_register_object (
tp_base_connection_get_dbus_daemon (self->priv->conn),
self->priv->object_path, self);
@@ -445,15 +430,7 @@ static void
finalize (GObject *object)
{
ExampleCSHRoomChannel *self = EXAMPLE_CSH_ROOM_CHANNEL (object);
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
- TpHandleRepoIface *room_handles = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_ROOM);
-
- if (self->priv->initiator != 0)
- tp_handle_unref (contact_handles, self->priv->initiator);
- tp_handle_unref (room_handles, self->priv->handle);
g_free (self->priv->object_path);
tp_text_mixin_finalize (object);
diff --git a/tests/lib/glib/echo/chan.c b/tests/lib/glib/echo/chan.c
index 90f52e0d..d83019a3 100644
--- a/tests/lib/glib/echo/chan.c
+++ b/tests/lib/glib/echo/chan.c
@@ -88,11 +88,6 @@ constructor (GType type,
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
(self->priv->conn, TP_HANDLE_TYPE_CONTACT);
- tp_handle_ref (contact_repo, self->priv->handle);
-
- if (self->priv->initiator != 0)
- tp_handle_ref (contact_repo, self->priv->initiator);
-
tp_dbus_daemon_register_object (
tp_base_connection_get_dbus_daemon (self->priv->conn),
self->priv->object_path, self);
@@ -247,13 +242,6 @@ static void
finalize (GObject *object)
{
ExampleEchoChannel *self = EXAMPLE_ECHO_CHANNEL (object);
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
-
- tp_handle_unref (contact_handles, self->priv->handle);
-
- if (self->priv->initiator != 0)
- tp_handle_unref (contact_handles, self->priv->initiator);
g_free (self->priv->object_path);
@@ -372,17 +360,7 @@ example_echo_channel_close (ExampleEchoChannel *self)
{
if (self->priv->initiator != first_sender)
{
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
- TpHandle old_initiator = self->priv->initiator;
-
- if (first_sender != 0)
- tp_handle_ref (contact_repo, first_sender);
-
self->priv->initiator = first_sender;
-
- if (old_initiator != 0)
- tp_handle_unref (contact_repo, old_initiator);
}
tp_text_mixin_set_rescued (object);
diff --git a/tests/lib/glib/echo2/chan.c b/tests/lib/glib/echo2/chan.c
index 4df087d0..9aaca610 100644
--- a/tests/lib/glib/echo2/chan.c
+++ b/tests/lib/glib/echo2/chan.c
@@ -233,8 +233,6 @@ constructor (GType type,
G_OBJECT_CLASS (example_echo_2_channel_parent_class)->constructor (type,
n_props, props);
ExampleEcho2Channel *self = EXAMPLE_ECHO_2_CHANNEL (object);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
static TpChannelTextMessageType const types[] = {
TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
@@ -242,11 +240,6 @@ constructor (GType type,
};
static const char * const content_types[] = { "*/*", NULL };
- tp_handle_ref (contact_repo, self->priv->handle);
-
- if (self->priv->initiator != 0)
- tp_handle_ref (contact_repo, self->priv->initiator);
-
tp_dbus_daemon_register_object (
tp_base_connection_get_dbus_daemon (self->priv->conn),
self->priv->object_path, self);
@@ -402,13 +395,6 @@ static void
finalize (GObject *object)
{
ExampleEcho2Channel *self = EXAMPLE_ECHO_2_CHANNEL (object);
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
-
- tp_handle_unref (contact_handles, self->priv->handle);
-
- if (self->priv->initiator != 0)
- tp_handle_unref (contact_handles, self->priv->initiator);
g_free (self->priv->object_path);
@@ -526,17 +512,7 @@ example_echo_2_channel_close (ExampleEcho2Channel *self)
{
if (self->priv->initiator != first_sender)
{
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
- TpHandle old_initiator = self->priv->initiator;
-
- if (first_sender != 0)
- tp_handle_ref (contact_repo, first_sender);
-
self->priv->initiator = first_sender;
-
- if (old_initiator != 0)
- tp_handle_unref (contact_repo, old_initiator);
}
tp_message_mixin_set_rescued (object);
diff --git a/tests/lib/glib/future/conn-addressing/conn.c b/tests/lib/glib/future/conn-addressing/conn.c
index a7954d06..3fd25a50 100644
--- a/tests/lib/glib/future/conn-addressing/conn.c
+++ b/tests/lib/glib/future/conn-addressing/conn.c
@@ -257,7 +257,6 @@ addressing_get_contacts_by_uri (FutureSvcConnectionInterfaceAddressing *iface,
future_svc_connection_interface_addressing_return_from_get_contacts_by_uri (
context, requested, attributes);
- tp_handles_unref (contact_repo, handles);
g_hash_table_unref (requested);
g_hash_table_unref (attributes);
g_free (sender);
@@ -340,7 +339,6 @@ addressing_get_contacts_by_vcard_field (FutureSvcConnectionInterfaceAddressing *
future_svc_connection_interface_addressing_return_from_get_contacts_by_vcard_field (
context, requested, attributes);
- tp_handles_unref (contact_repo, handles);
g_hash_table_unref (requested);
g_hash_table_unref (attributes);
g_free (sender);
diff --git a/tests/lib/glib/simple-conn.c b/tests/lib/glib/simple-conn.c
index 496f2069..542832a8 100644
--- a/tests/lib/glib/simple-conn.c
+++ b/tests/lib/glib/simple-conn.c
@@ -347,7 +347,6 @@ tp_tests_simple_connection_set_identifier (TpTestsSimpleConnection *self,
g_return_if_fail (handle != 0);
tp_base_connection_set_self_handle (conn, handle);
- tp_handle_unref (contact_repo, handle);
}
TpTestsSimpleConnection *
@@ -403,8 +402,6 @@ tp_tests_simple_connection_ensure_text_chan (TpTestsSimpleConnection *self,
chan);
}
- tp_handle_unref (contact_repo, handle);
-
if (props != NULL)
*props = tp_tests_text_channel_get_props (chan);
diff --git a/tests/lib/glib/textchan-null.c b/tests/lib/glib/textchan-null.c
index 793b75b9..4b9644d1 100644
--- a/tests/lib/glib/textchan-null.c
+++ b/tests/lib/glib/textchan-null.c
@@ -95,8 +95,6 @@ constructor (GType type,
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
(self->priv->conn, TP_HANDLE_TYPE_CONTACT);
- tp_handle_ref (contact_repo, self->priv->handle);
-
tp_dbus_daemon_register_object (
tp_base_connection_get_dbus_daemon (self->priv->conn),
self->priv->object_path, self);
@@ -236,10 +234,7 @@ static void
finalize (GObject *object)
{
TpTestsTextChannelNull *self = TP_TESTS_TEXT_CHANNEL_NULL (object);
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
- tp_handle_unref (contact_handles, self->priv->handle);
g_free (self->priv->object_path);
tp_text_mixin_finalize (object);