On Do, 17.08.17 13:43, James Johnson (jjjwallyh...@gmail.com) wrote: > Hello, > > Can someone please point me to the correct method for reading an "ao" > signature dbus message using the sd_bus C api? > > I am trying to read all the network devices with the following call: > > result = sd_bus_get_property(m_bus, "org.freedesktop.NetworkManager", > "/org/freedesktop/NetworkManager", > "org.freedesktop.NetworkManager", > "AllDevices", &error, > &msgCall, "ao"); > I have tried: > > char * ptr; > size_t size; > > result = sd_bus_message_read_array(msgCall, 'o', &ptr, &size);
_read_array() only works for trivial types, not for strings and other variable length types. If you have such complex types you need to enter the array with _enter_container() and then _read() each item individually... But I see you already figure that out... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel