[PATCH v2] supplicant: Print human readable event names.
greearb at candelatech.com
Wed Nov 9 12:11:05 EST 2011
On 11/09/2011 06:26 AM, Jouni Malinen wrote:
> On Mon, Nov 07, 2011 at 02:21:02PM -0800, greearb at candelatech.com wrote:
>> This makes it easier to understand the event related
> I can understand this part..
>> Also, print re-entrancy depth in the event handler.
>> I'm suspicious that it could be called in a re-entrant
>> manner if netlink events are received& processed as
>> part of another event.
> This sounds strange. I would recommend splitting this part to a separate
> patch if you want to get the human readable part in.. I would need to
> hear quite a bit more convincing explanation on how you think this
> function can be used in re-entrant manner in a single process
> implementation with eloop.
I was having a paranoid day...and I never did see a recursive call,
so I'm probably wrong about that part. I'll check that code path
again and remove it from the patch unless I find something
>> diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
>> +#include "drivers/driver.h"
> This wpa_common.c file should not really use driver interface.
>> +const char* event_to_string(enum wpa_event_type event)
> And this does not belong here either.. wpa_common.c is a set of common
> helper functions for WPA EAPOL-Key processing. Driver events have
> nothing to do with it. If you are using this only in
> wpa_supplicant/events.c, it would be better to add the function there.
> If there is a plan to have this shared with hostapd, a new C file in
> src/drivers could be the best approach.
Seems like it's useful common code. I'll try adding a new file.
Are you OK with the function header being in driver.h?
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the HostAP