aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2009-02-09 17:45:06 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-15 13:07:19 (GMT)
commit6f3288c6827b45eff20be7ae362608ae2a22d9c0 (patch)
tree2efb4673200604d4cd3c60452b767ca44547f0fd /wpa_supplicant
parent3ffb0e42535c09ead1856b73cac9623a908d4d28 (diff)
downloadhostap-06-6f3288c6827b45eff20be7ae362608ae2a22d9c0.zip
hostap-06-6f3288c6827b45eff20be7ae362608ae2a22d9c0.tar.gz
hostap-06-6f3288c6827b45eff20be7ae362608ae2a22d9c0.tar.bz2
Send a dbus reply only if requested by the caller
wpa_supplicant should not send a dbus reply as response to a method call if no reply was requested by the caller. Sending a reply even if not requested is basically no problem but triggers dbus warnings like the one below. Feb 9 07:31:23 linux-gvjr dbus-daemon: Rejected send message, 2 matched rules; type="error", sender=":1.129" (uid=0 pid=30228 comm="/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wp") interface="(unset)" member="(unset)" error name="fi.epitest.hostap.WPASupplicant.InvalidInterface" requested_reply=0 destination=":1.128" (uid=0 pid=30226 comm="/usr/sbin/NetworkManager ")) Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> (cherry picked from commit c3f5b1e16d119392ec30e3b5a0d015ee2aa3d664)
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ctrl_iface_dbus.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wpa_supplicant/ctrl_iface_dbus.c b/wpa_supplicant/ctrl_iface_dbus.c
index b772247..c4e329c 100644
--- a/wpa_supplicant/ctrl_iface_dbus.c
+++ b/wpa_supplicant/ctrl_iface_dbus.c
@@ -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);
}