Send a dbus reply only if requested by the caller
[wpasupplicant] / wpa_supplicant / ctrl_iface_dbus.c
index b772247..c4e329c 100644 (file)
@@ -548,7 +548,8 @@ static DBusHandlerResult wpas_iface_message_handler(DBusConnection *connection,
 
        /* If the message was handled, send back the reply */
        if (reply) {
-               dbus_connection_send(connection, reply, NULL);
+               if (!dbus_message_get_no_reply(message))
+                       dbus_connection_send(connection, reply, NULL);
                dbus_message_unref(reply);
        }
 
@@ -607,7 +608,8 @@ static DBusHandlerResult wpas_message_handler(DBusConnection *connection,
 
        /* If the message was handled, send back the reply */
        if (reply) {
-               dbus_connection_send(connection, reply, NULL);
+               if (!dbus_message_get_no_reply(message))
+                       dbus_connection_send(connection, reply, NULL);
                dbus_message_unref(reply);
        }