[PATCH] Export disconnect reason code to dbus
Jouni Malinen
j
Sat Apr 21 08:46:06 PDT 2012
On Wed, Apr 18, 2012 at 12:16:07PM -0700, Gary Morain wrote:
> In the properties changed signal, added a new propery "DisconnectReason",
> which carries the IEEE 802.11 reason code of the most recent
> disassociation or deauthentication event. The reason code is negative
> if it is locally generated. The property is sent to the DBUS
> immediately so as to prevent it from being coalesced with other
> disconnect events.
Thanks. The changes themselves look fine with some minor cleanup as
mentioned below. Could you please read the CONTRIBUTIONS file (*) and
submit a version of the patch with the Signed-hostap: tag in the commit
log?
(*)
http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=blob_plain;f=CONTRIBUTIONS
> diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
> @@ -2298,6 +2298,26 @@ dbus_bool_t wpas_dbus_setter_fast_reauth(DBusMessageIter *iter,
> + * wpas_dbus_getter_disconenct_reason - Get most recent reason for disconect
Typo in the function name ^^
> +dbus_bool_t wpas_dbus_getter_disconnect_reason(DBusMessageIter *iter,
> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> index 8fdc544..8174513 100644
> --- a/wpa_supplicant/events.c
> +++ b/wpa_supplicant/events.c
> @@ -1659,6 +1659,11 @@ static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s,
> wpa_sm_notify_disassoc(wpa_s->wpa);
> + wpa_s->disconnect_reason = reason_code;
Using tabs instead of eight spaces would be preferred for indentation.
> diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
> @@ -548,6 +548,9 @@ struct wpa_supplicant {
> + // WLAN_REASON_* reason codes. Negative if locally generated.
> + int disconnect_reason;
/* ... */ would be preferred comment style.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list