Browse Source

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>
Jouni Malinen 10 years ago
parent
commit
5485798f40
2 changed files with 11 additions and 2 deletions
  1. 3 2
      wpa_supplicant/dbus/dbus_new_helpers.c
  2. 8 0
      wpa_supplicant/dbus/dbus_old.c

+ 3 - 2
wpa_supplicant/dbus/dbus_new_helpers.c

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

+ 8 - 0
wpa_supplicant/dbus/dbus_old.c

@@ -216,6 +216,10 @@ static DBusHandlerResult wpas_iface_message_handler(DBusConnection *connection,
 	if (!msg_interface)
 		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,
 	                                                 &bssid);
 	if (iface_obj_path == NULL) {
@@ -328,6 +332,10 @@ static DBusHandlerResult wpas_message_handler(DBusConnection *connection,
 	if (!method || !path || !ctrl_iface || !msg_interface)
 		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 */
 	if (strcmp(msg_interface, WPAS_DBUS_INTERFACE) != 0)
 		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;