hal/hald hald_dbus.c,1.43,1.44

Kay Sievers kay at freedesktop.org
Thu Dec 8 13:51:31 PST 2005


Update of /cvs/hal/hal/hald
In directory gabe:/tmp/cvs-serv3675/hald

Modified Files:
	hald_dbus.c 
Log Message:
2005-12-08  Kay Sievers  <kay.sievers at vrfy.org>

        * hald/hald_dbus.c: (hald_exec_method): Allow stringlists
        to be passed to method calls. Signature "sas" will expect:
        Method(string: array:string:abc,xyz)



Index: hald_dbus.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald_dbus.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- hald_dbus.c	2 Nov 2005 15:38:13 -0000	1.43
+++ hald_dbus.c	8 Dec 2005 21:51:29 -0000	1.44
@@ -2663,12 +2663,28 @@
 			break;
 		}
 
+		case DBUS_TYPE_ARRAY:
+		{
+			DBusMessageIter iter_strlist;
+			if (dbus_message_iter_get_element_type (&iter) != DBUS_TYPE_STRING)
+				return FALSE;
+
+			dbus_message_iter_recurse (&iter, &iter_strlist);
+			while (dbus_message_iter_get_arg_type (&iter_strlist) == DBUS_TYPE_STRING) {
+				const char *value;
+				dbus_message_iter_get_basic (&iter_strlist, &value);
+				g_string_append (stdin_str, value);
+				g_string_append (stdin_str, "\t");
+				dbus_message_iter_next(&iter_strlist);
+			}
+			break;
+		}
+
 		default:
 			goto error;
 		}
 
 		g_string_append_c (stdin_str, '\n');
-		
 		dbus_message_iter_next (&iter);
 	}
 




More information about the hal-commit mailing list