diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2012-10-29 12:41:52 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2012-10-29 12:41:52 +0000 |
commit | 04b6b070c32e3cd54a9c8c0bb218899fc6208eb4 (patch) | |
tree | 2f67521c91a8fb7fb6c9500f6f157cc676d5a6ff | |
parent | 331e6c167d79bc6d98a1b23f2f072a65cfe10a14 (diff) |
Fix warnings in roomlist code.
Whoops.
-rw-r--r-- | src/idle-roomlist-channel.c | 20 | ||||
-rw-r--r-- | src/idle-roomlist-manager.c | 7 |
2 files changed, 13 insertions, 14 deletions
diff --git a/src/idle-roomlist-channel.c b/src/idle-roomlist-channel.c index d5346ad..c88a73e 100644 --- a/src/idle-roomlist-channel.c +++ b/src/idle-roomlist-channel.c @@ -90,9 +90,8 @@ idle_roomlist_channel_constructed (GObject *obj) IDLE_PARSER_NUMERIC_LISTEND, _rpl_listend_handler, obj); priv->rooms = g_ptr_array_new (); - TpHandleRepoIface *room_handles = tp_base_connection_get_handles ( - TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_ROOM); - priv->handles = tp_handle_set_new(room_handles); + priv->handles = tp_handle_set_new(tp_base_connection_get_handles ( + TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_ROOM)); } static gchar * @@ -136,6 +135,11 @@ idle_roomlist_channel_class_init (IdleRoomlistChannelClass *idle_roomlist_channe { GObjectClass *object_class = G_OBJECT_CLASS (idle_roomlist_channel_class); TpBaseChannelClass *base_channel_class = TP_BASE_CHANNEL_CLASS (idle_roomlist_channel_class); + static TpDBusPropertiesMixinPropImpl roomlist_props[] = { + { "Server", NULL, NULL }, + { NULL } + }; + g_type_class_add_private (idle_roomlist_channel_class, sizeof (IdleRoomlistChannelPrivate)); @@ -149,11 +153,6 @@ idle_roomlist_channel_class_init (IdleRoomlistChannelClass *idle_roomlist_channe base_channel_class->fill_immutable_properties = idle_roomlist_channel_fill_properties; base_channel_class->get_object_path_suffix = idle_roomlist_channel_get_path_suffix; - static TpDBusPropertiesMixinPropImpl roomlist_props[] = { - { "Server", NULL, NULL }, - { NULL } - }; - tp_dbus_properties_mixin_implement_interface (object_class, TP_IFACE_QUARK_CHANNEL_TYPE_ROOM_LIST, idle_roomlist_channel_get_roomlist_property, @@ -268,12 +267,11 @@ idle_roomlist_channel_stop_listing (TpSvcChannelTypeRoomList *iface, DBusGMethodInvocation *context) { IdleRoomlistChannel *self = IDLE_ROOMLIST_CHANNEL (iface); + GError error = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Can't stop listing!" }; g_assert (IDLE_IS_ROOMLIST_CHANNEL (self)); - GError *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, "Room listing not yet implemented"); - dbus_g_method_return_error (context, error); - g_error_free (error); + dbus_g_method_return_error (context, &error); /* priv->listing = FALSE; diff --git a/src/idle-roomlist-manager.c b/src/idle-roomlist-manager.c index ed536b6..90921bb 100644 --- a/src/idle-roomlist-manager.c +++ b/src/idle-roomlist-manager.c @@ -296,11 +296,12 @@ _roomlist_manager_requestotron (IdleRoomlistManager *self, GHashTable *request_properties, gboolean require_new) { - IDLE_DEBUG("requesting new room list channel"); IdleRoomlistManagerPrivate *priv = self->priv; GError *error = NULL; TpHandle handle; + IDLE_DEBUG("requesting new room list channel"); + if (tp_strdiff (tp_asv_get_string (request_properties, TP_IFACE_CHANNEL ".ChannelType"), TP_IFACE_CHANNEL_TYPE_ROOM_LIST)) return FALSE; @@ -323,7 +324,7 @@ _roomlist_manager_requestotron (IdleRoomlistManager *self, if (handle != 0) { - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Can't open a room list channel to a particular handle"); goto error; } @@ -336,7 +337,7 @@ _roomlist_manager_requestotron (IdleRoomlistManager *self, if (require_new) { - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Only one room list channel can be created"); goto error; } |