diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2011-03-22 19:21:13 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2011-03-25 14:03:03 -0400 |
commit | 042b98b372507c7f637edd0d9a6c2c2846eb0752 (patch) | |
tree | 71ed10fe90a1471514a5b6885bd786b505cb023e | |
parent | 7f2f8ff8762e098f049ec90c50cba4520c2d0a01 (diff) |
Make avatar token empty string by default
This avoid confusion when reading back from log store where there is
often no difference between the empty string and NULL.
-rw-r--r-- | telepathy-logger/entity.c | 2 | ||||
-rw-r--r-- | tests/dbus/test-entity.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/telepathy-logger/entity.c b/telepathy-logger/entity.c index de17a59..f816e8d 100644 --- a/telepathy-logger/entity.c +++ b/telepathy-logger/entity.c @@ -225,7 +225,7 @@ tpl_entity_new (const gchar *id, "identifier", id, "type", type, "alias", alias == NULL ? id : alias, - "avatar-token", avatar_token, + "avatar-token", avatar_token == NULL ? "" : avatar_token, NULL); switch (type) diff --git a/tests/dbus/test-entity.c b/tests/dbus/test-entity.c index 0f7cda4..03fccfd 100644 --- a/tests/dbus/test-entity.c +++ b/tests/dbus/test-entity.c @@ -26,7 +26,7 @@ test_entity_instantiation (void) NULL, NULL); g_assert_cmpstr (tpl_entity_get_alias (entity), ==, "my-identifier"); - g_assert (tpl_entity_get_avatar_token (entity) == NULL); + g_assert_cmpstr (tpl_entity_get_avatar_token (entity), ==, ""); g_object_unref (entity); } @@ -41,7 +41,7 @@ test_entity_instantiation_from_room_id (void) g_assert_cmpstr (tpl_entity_get_identifier (entity), ==, "my-room-id"); g_assert (tpl_entity_get_entity_type (entity) == TPL_ENTITY_ROOM); g_assert_cmpstr (tpl_entity_get_alias (entity), ==, "my-room-id"); - g_assert (tpl_entity_get_avatar_token (entity) == NULL); + g_assert_cmpstr (tpl_entity_get_avatar_token (entity), ==, ""); g_object_unref (entity); } @@ -135,7 +135,7 @@ test_entity_instantiation_from_tp_contact (void) g_assert_cmpstr (tpl_entity_get_identifier (entity), ==, "bob"); g_assert (tpl_entity_get_entity_type (entity) == TPL_ENTITY_CONTACT); g_assert_cmpstr (tpl_entity_get_alias (entity), ==, alias[1]); - g_assert (tpl_entity_get_avatar_token (entity) == NULL); + g_assert_cmpstr (tpl_entity_get_avatar_token (entity), ==, ""); g_object_unref (entity); g_object_unref (result.contacts[0]); |