D-Bus: Add more debug prints to cover operations

This adds the message signature to the new D-Bus interface message
handler and similar prints to the old interface messages handlers.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-12-31 20:25:49 +02:00
parent 7fbe56b018
commit 5485798f40
2 changed files with 11 additions and 2 deletions

View File

@ -388,8 +388,9 @@ static DBusHandlerResult message_handler(DBusConnection *connection,
if (!method || !path || !msg_interface) if (!method || !path || !msg_interface)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
wpa_printf(MSG_MSGDUMP, "dbus: %s.%s (%s)", wpa_printf(MSG_MSGDUMP, "dbus: %s.%s (%s) [%s]",
msg_interface, method, path); msg_interface, method, path,
dbus_message_get_signature(message));
/* if message is introspection method call */ /* if message is introspection method call */
if (!os_strncmp(WPA_DBUS_INTROSPECTION_METHOD, method, if (!os_strncmp(WPA_DBUS_INTROSPECTION_METHOD, method,

View File

@ -216,6 +216,10 @@ static DBusHandlerResult wpas_iface_message_handler(DBusConnection *connection,
if (!msg_interface) if (!msg_interface)
goto out; goto out;
wpa_printf(MSG_MSGDUMP, "dbus[old/iface]: %s.%s (%s) [%s]",
msg_interface, method, path,
dbus_message_get_signature(message));
iface_obj_path = wpas_dbus_decompose_object_path(path, &network, iface_obj_path = wpas_dbus_decompose_object_path(path, &network,
&bssid); &bssid);
if (iface_obj_path == NULL) { if (iface_obj_path == NULL) {
@ -328,6 +332,10 @@ static DBusHandlerResult wpas_message_handler(DBusConnection *connection,
if (!method || !path || !ctrl_iface || !msg_interface) if (!method || !path || !ctrl_iface || !msg_interface)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
wpa_printf(MSG_MSGDUMP, "dbus[old]: %s.%s (%s) [%s]",
msg_interface, method, path,
dbus_message_get_signature(message));
/* Validate the method interface */ /* Validate the method interface */
if (strcmp(msg_interface, WPAS_DBUS_INTERFACE) != 0) if (strcmp(msg_interface, WPAS_DBUS_INTERFACE) != 0)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;