[Telepathy-commits] [telepathy-salut/master] Don't rely on the order in the file_transfer_channel_fixed_properties list

Sjoerd Simons sjoerd.simons at collabora.co.uk
Wed Nov 19 07:06:39 PST 2008


---
 src/salut-ft-manager.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/salut-ft-manager.c b/src/salut-ft-manager.c
index 9abdba5..da39de1 100644
--- a/src/salut-ft-manager.c
+++ b/src/salut-ft-manager.c
@@ -465,6 +465,7 @@ error:
   return TRUE;
 }
 
+/* Keep in sync with values set in salut_ft_manager_foreach_channel_class */
 static const gchar * const file_transfer_channel_fixed_properties[] = {
     TP_IFACE_CHANNEL ".ChannelType",
     TP_IFACE_CHANNEL ".TargetHandleType",
@@ -499,13 +500,11 @@ salut_ft_manager_foreach_channel_class (TpChannelManager *manager,
 
   value = tp_g_value_slice_new (G_TYPE_STRING);
   g_value_set_static_string (value, SALUT_IFACE_CHANNEL_TYPE_FILE_TRANSFER);
-  g_hash_table_insert (table,
-      (gchar *) file_transfer_channel_fixed_properties[0], value);
+  g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType" , value);
 
   value = tp_g_value_slice_new (G_TYPE_UINT);
   g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT);
-  g_hash_table_insert (table,
-      (gchar *) file_transfer_channel_fixed_properties[1], value);
+  g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", value);
 
   func (manager, table, file_transfer_channel_allowed_properties,
       user_data);
-- 
1.5.6.5




More information about the Telepathy-commits mailing list