Remove the occurence of dbus_message_iter_get_array_len() due to its obsolescence.
authorPeng Huang <shawn.p.huang@gmail.com>
Tue, 23 Feb 2010 00:10:28 +0000 (08:10 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Tue, 23 Feb 2010 00:10:28 +0000 (08:10 +0800)
In Header <dbus/dbus-message.h>
  #ifndef DBUS_DISABLE_DEPRECATED
  /* This function returns the wire protocol size of the array in bytes,
   * you do not want to know that probably
   */
  DBUS_DEPRECATED int dbus_message_iter_get_array_len (DBusMessageIter *iter);
  #endif

src/ibusbus.c

index 9a522dade69c4e3f717e047eac87d39b09c0ad89..d88e188a57b0c29b26045ff355b163d7c4393c15 100644 (file)
@@ -806,20 +806,16 @@ ibus_bus_do_list_engines (IBusBus *bus, gboolean active_engines_only)
         return NULL;
     }
 
-    if (dbus_message_iter_get_array_len (&subiter) <= 0) {
-        ibus_message_unref (reply);
-        return NULL;
-    }
-
     engines = NULL;
-    do {
+    while (ibus_message_iter_get_arg_type (&subiter) != G_TYPE_INVALID) {
         IBusSerializable *object = NULL;
         if (!ibus_message_iter_get (&subiter, IBUS_TYPE_ENGINE_DESC, &object) || !object) {
             g_warning ("Unexpected type is returned from %s", member);
             continue;
         }
         engines = g_list_append (engines, object);
-    } while (ibus_message_iter_next (&subiter));
+        ibus_message_iter_next (&subiter);
+    };
 
     ibus_message_unref (reply);
     return engines;