libeap.git
14 years agoFix memory leak on RSN preauth init error path
Jouni Malinen [Wed, 6 Jan 2010 19:14:09 +0000 (21:14 +0200)]
Fix memory leak on RSN preauth init error path

14 years agoFix WMM default parameters
Lennert Buytenhek [Wed, 6 Jan 2010 18:48:29 +0000 (20:48 +0200)]
Fix WMM default parameters

wmm_ac_??_cw{min,max} parameters are in log form

When the wme_ac_??_cw{min,max} parameters aren't specified in
hostapd.conf, hostapd uses an incorrect set of default values, as the
defaults are in 2^x-1 form instead of in log form.  This patch changes
them over to the expected log form.

14 years agoRemove forgotten script termination attempt
Jouni Malinen [Wed, 6 Jan 2010 18:23:47 +0000 (20:23 +0200)]
Remove forgotten script termination attempt

14 years agodbus: Document BSS PropertiesChanged signal
Jouni Malinen [Wed, 6 Jan 2010 18:06:11 +0000 (20:06 +0200)]
dbus: Document BSS PropertiesChanged signal

14 years agodbus: Add BSS property change notifications
Witold Sowa [Wed, 6 Jan 2010 18:03:01 +0000 (20:03 +0200)]
dbus: Add BSS property change notifications

14 years agodbus: Fix crash on property change if D-Bus API is disabled
Jouni Malinen [Wed, 6 Jan 2010 10:14:35 +0000 (12:14 +0200)]
dbus: Fix crash on property change if D-Bus API is disabled

14 years agodbus: Fix prop_changed_flags allocation to count properties correctly
Jouni Malinen [Wed, 6 Jan 2010 09:55:21 +0000 (11:55 +0200)]
dbus: Fix prop_changed_flags allocation to count properties correctly

There was an extra semicolon that broke the calculation of registered
properties and resulted in obj_desc->prop_changed_flags not being
allocated long enough for all the flags.

14 years agodbus: Fix flush_object_timeout_handler context to be consistent
Jouni Malinen [Wed, 6 Jan 2010 09:50:43 +0000 (11:50 +0200)]
dbus: Fix flush_object_timeout_handler context to be consistent

The path pointer used as the timeout_ctx was not constant; the path
string itself may have been the same, but the pointer certainly was not
since it was sometimes from stack and sometimes from the dynamically
allocated buffer in obj_desc. This caused some of the eloop timeout
cancellations not to find the timeout. Fix this by using the obj_desc
as the timeout context data.

14 years agoMark fmt parameter const for wpa_printf/msg
Jouni Malinen [Mon, 4 Jan 2010 17:16:19 +0000 (19:16 +0200)]
Mark fmt parameter const for wpa_printf/msg

14 years agodbus: Aggregate PropertiesChanged signals
Witold Sowa [Mon, 4 Jan 2010 15:15:57 +0000 (17:15 +0200)]
dbus: Aggregate PropertiesChanged signals

Instead of sending PropertiesChanged signals for each changed
property separately, mark properties as changed and send aggregated
PropertiesChanged signals for each interface in each object.
Aggregated PropertiesChanged signal is sent
- for all object after responding on DBus call
- for specified object after manual call to
  wpa_dbus_flush_object_changed_properties() function
- for each object separately after short timeout (currently 5 ms)
  which starts when first property in object is marked changed

14 years agodbus: Change BSS property MaxRate to Rates
Witold Sowa [Mon, 4 Jan 2010 14:52:30 +0000 (16:52 +0200)]
dbus: Change BSS property MaxRate to Rates

Instead of exposing maximum BSS bit rate, expose sorted array
of all supported rates.

14 years agodbus: Remove forgotten, unused functions from GetAll script
Jouni Malinen [Mon, 4 Jan 2010 14:35:38 +0000 (16:35 +0200)]
dbus: Remove forgotten, unused functions from GetAll script

14 years agodbus: Update example scripts to use PropertiesChanged
Jouni Malinen [Mon, 4 Jan 2010 14:34:06 +0000 (16:34 +0200)]
dbus: Update example scripts to use PropertiesChanged

The StateChanged signal was removed, to use PropertiesChanged instead.

14 years agodbus: Replace StateChanged with PropertiesChanged signal
Marcel Holtmann [Mon, 4 Jan 2010 14:33:44 +0000 (16:33 +0200)]
dbus: Replace StateChanged with PropertiesChanged signal

The actual supplicant state is exposed via a property on the interface
object. So having a separate signal StateChanged for notifying about
changes is a bad idea. The standard PropertiesChanged signal should be
used for this.

The advantage of StateChanged signal was that it includes the previous
state, but not even NetworkManager is making use of this. And tracking
the old state via the property and this signal is easily possible anyway.

14 years agodbus: Use simple strings for debug level
Marcel Holtmann [Mon, 4 Jan 2010 14:22:26 +0000 (16:22 +0200)]
dbus: Use simple strings for debug level

Instead of using some magic integer values that really only mean
something to WPA internal code, just use simple strings. Possible
values are "msgdump", "debug", "info", "warning" and "error" which
map directly to WPA debugging support.

14 years agonl80211: Fix a typo
Jouni Malinen [Sun, 3 Jan 2010 20:20:27 +0000 (22:20 +0200)]
nl80211: Fix a typo

14 years agoUse common driver code for Linux hwaddr get/set
Jouni Malinen [Sun, 3 Jan 2010 20:17:08 +0000 (22:17 +0200)]
Use common driver code for Linux hwaddr get/set

14 years agoShare a single Linux ioctl helper fo setting interface up/down
Jouni Malinen [Sun, 3 Jan 2010 20:08:26 +0000 (22:08 +0200)]
Share a single Linux ioctl helper fo setting interface up/down

Number of Linux driver wrappers included this more or less identical
function, so lets add a new helper file to be able to share some more
code between the driver wrappers.

14 years agoFix compiler warnings for non-WPS build
Jouni Malinen [Sun, 3 Jan 2010 19:21:03 +0000 (21:21 +0200)]
Fix compiler warnings for non-WPS build

14 years agobsd: Fix a typo
Jouni Malinen [Sun, 3 Jan 2010 19:18:55 +0000 (21:18 +0200)]
bsd: Fix a typo

14 years agoStandardize on a single definition of auth_alg bitfield values
Jouni Malinen [Sun, 3 Jan 2010 19:14:40 +0000 (21:14 +0200)]
Standardize on a single definition of auth_alg bitfield values

14 years agoShare the same enum for MFP configuration
Jouni Malinen [Sun, 3 Jan 2010 19:02:51 +0000 (21:02 +0200)]
Share the same enum for MFP configuration

The three existing enums were already depending on using the same
values in couple of places and it is just simpler to standardize on
one of these to avoid need for mapping between different enums for
the exact same thing.

14 years agoMore Doxygen documentation for the driver interface
Jouni Malinen [Sun, 3 Jan 2010 18:49:48 +0000 (20:49 +0200)]
More Doxygen documentation for the driver interface

14 years agoRemove src/drivers/scan_helpers.c
Jouni Malinen [Sun, 3 Jan 2010 18:27:32 +0000 (20:27 +0200)]
Remove src/drivers/scan_helpers.c

Most of this file was already moved into wpa_supplicant/scan.c and
we can remove the file completely by having couple of small helper
functions copied to the remaining users outside core wpa_supplicant
code.

14 years agoMove wpa_supplicant specific scan code away from src/drivers
Jouni Malinen [Sun, 3 Jan 2010 16:48:11 +0000 (18:48 +0200)]
Move wpa_supplicant specific scan code away from src/drivers

This fits better in wpa_supplicant/scan.c. Couple of remaining
scan_helpers.c functions are currently used in driver wrappers,
but they can likely be removed in the future.

14 years agoAdd drv_event_eapol_rx() helper
Jouni Malinen [Sun, 3 Jan 2010 16:35:01 +0000 (18:35 +0200)]
Add drv_event_eapol_rx() helper

14 years agoUse generic driver event notification for AP mode assoc/disassoc
Jouni Malinen [Sun, 3 Jan 2010 16:22:22 +0000 (18:22 +0200)]
Use generic driver event notification for AP mode assoc/disassoc

14 years agoUse driver event, EVENT_EAPOL_RX, for EAPOL frame indication
Jouni Malinen [Sun, 3 Jan 2010 15:44:40 +0000 (17:44 +0200)]
Use driver event, EVENT_EAPOL_RX, for EAPOL frame indication

14 years agoReplace hostapd_notif_new_sta() with new driver event, EVENT_NEW_STA
Jouni Malinen [Sun, 3 Jan 2010 14:46:18 +0000 (16:46 +0200)]
Replace hostapd_notif_new_sta() with new driver event, EVENT_NEW_STA

14 years agodriver_test: Add channel awareness for the MLME test code
Jouni Malinen [Sun, 3 Jan 2010 12:01:20 +0000 (14:01 +0200)]
driver_test: Add channel awareness for the MLME test code

This allows the MLME mode of driver_test to filter frames based on
the frequency on which they were sent and the frequency used by the
receiver.

14 years agoAdd driver API functionality for off-channel Action frames
Jouni Malinen [Sun, 3 Jan 2010 11:57:51 +0000 (13:57 +0200)]
Add driver API functionality for off-channel Action frames

This adds new commands and events for allowing off-channel Action
frame exchanges to be requested. This functionality is not yet used
and is only fully supported by driver_test.c at this point.
driver_nl80211.c has support for the remain-on-channel commands, but
the Action frame TX/RX part is still pending review for the kernel
code and as such, is not yet included here.

14 years agoSync with wireless-testing.git linux/nl80211.h
Jouni Malinen [Sun, 3 Jan 2010 11:56:18 +0000 (13:56 +0200)]
Sync with wireless-testing.git linux/nl80211.h

14 years agoAdd driver ops for allocating interface addresses
Jouni Malinen [Sun, 3 Jan 2010 11:42:06 +0000 (13:42 +0200)]
Add driver ops for allocating interface addresses

This adds placeholder code for allowing the virtual interfaces to be
pre-allocated a MAC address before the interface type is known with
drivers that do not handle interface type changes.

14 years agoAdd a driver op for enabling Probe Request reporting in station mode
Jouni Malinen [Sun, 3 Jan 2010 11:30:22 +0000 (13:30 +0200)]
Add a driver op for enabling Probe Request reporting in station mode

14 years agoRemove unnecessary wpa_event_type typedef
Jouni Malinen [Sun, 3 Jan 2010 11:10:12 +0000 (13:10 +0200)]
Remove unnecessary wpa_event_type typedef

14 years agoFix CONFIG_AP=y build after driver API changes
Jouni Malinen [Sun, 3 Jan 2010 11:05:54 +0000 (13:05 +0200)]
Fix CONFIG_AP=y build after driver API changes

14 years agoMove struct hostapd_frame_info definition away from driver API
Jouni Malinen [Sun, 3 Jan 2010 10:37:02 +0000 (12:37 +0200)]
Move struct hostapd_frame_info definition away from driver API

This is internal data structure for hostapd/AP functionality and does
not need to be defined in driver.h.

14 years agodriver_test: Remove forgotten, unused prototypes
Jouni Malinen [Sun, 3 Jan 2010 10:36:32 +0000 (12:36 +0200)]
driver_test: Remove forgotten, unused prototypes

14 years agoRemove struct ieee80211_hdr dependency from EVENT_RX_FROM_UNKNOWN
Jouni Malinen [Sun, 3 Jan 2010 10:17:20 +0000 (12:17 +0200)]
Remove struct ieee80211_hdr dependency from EVENT_RX_FROM_UNKNOWN

It is simpler to just pass in u8* to the beginning of the header.

14 years agoReplace hostapd_probe_req_rx() with EVENT_RX_PROBE_REQ driver event
Jouni Malinen [Sun, 3 Jan 2010 10:11:44 +0000 (12:11 +0200)]
Replace hostapd_probe_req_rx() with EVENT_RX_PROBE_REQ driver event

14 years agoReplace wpa_supplicant_sta_rx() call with driver event
Jouni Malinen [Sun, 3 Jan 2010 09:50:26 +0000 (11:50 +0200)]
Replace wpa_supplicant_sta_rx() call with driver event

Get rid of wpa_supplicant_sta_rx() and add a new driver event that is
marked to be used only with driver_test.c. In addition, remove this
functionality from privsep wrapper. This is only use for client mode
MLME testing with driver_test.c.

14 years agoUse shared function for figuring out if BSS is in use
Jouni Malinen [Sun, 3 Jan 2010 08:55:31 +0000 (10:55 +0200)]
Use shared function for figuring out if BSS is in use

The BSS that is currently in use must not be freed even if it does
not show up in scan results.

14 years agohostapd: Fix deinit on initialization failure
Jouni Malinen [Sun, 3 Jan 2010 08:54:14 +0000 (10:54 +0200)]
hostapd: Fix deinit on initialization failure

14 years agoFix memory corruption on BSS entry reallocation
Jouni Malinen [Sat, 2 Jan 2010 23:25:43 +0000 (01:25 +0200)]
Fix memory corruption on BSS entry reallocation

The wpa_s->bss_id list was being corrupted when the BSS entry needed
to be reallocated due to longer IE data. The entry has to be removed
from all lists before reallocation to avoid this (it was only removed
from the wpa_s->bss list).

14 years agodbus: Use free_dbus_object_desc() consistently to free object descriptor
Jouni Malinen [Sat, 2 Jan 2010 23:01:56 +0000 (01:01 +0200)]
dbus: Use free_dbus_object_desc() consistently to free object descriptor

14 years agodbus: Remove duplication of object methods/signals/properties
Jouni Malinen [Sat, 2 Jan 2010 22:52:30 +0000 (00:52 +0200)]
dbus: Remove duplication of object methods/signals/properties

There is no need to duplicate the method/signal/property arrays that
were registered for objects. The registration was using static arrays
on methods/signals/properties in all places and we can as well use
those throughout without having to allocate memory and copy all the
entries for every object. This reduces number of allocations and
amount of unnecessary code quite a bit.

14 years agodbus: Use stack for temporary object path
Jouni Malinen [Sat, 2 Jan 2010 15:17:00 +0000 (17:17 +0200)]
dbus: Use stack for temporary object path

This is small enough buffer to not require more complex dynamic
allocation for temporary use.

14 years agoMaintain a pointer to the current BSS table entry
Jouni Malinen [Sat, 2 Jan 2010 14:59:19 +0000 (16:59 +0200)]
Maintain a pointer to the current BSS table entry

14 years agoDo not store raw scan results
Jouni Malinen [Sat, 2 Jan 2010 14:41:38 +0000 (16:41 +0200)]
Do not store raw scan results

Use scan results to update the BSS table and to select the BSS for
connection, but do not store the results for longer time.

14 years agoUse BSS table entry instead of raw scan result for connection
Jouni Malinen [Sat, 2 Jan 2010 14:16:02 +0000 (16:16 +0200)]
Use BSS table entry instead of raw scan result for connection

14 years agoUse BSS table for WPA get-Beacon-IEs operation
Jouni Malinen [Sat, 2 Jan 2010 13:26:50 +0000 (15:26 +0200)]
Use BSS table for WPA get-Beacon-IEs operation

14 years agoConvert ctrl_iface scan_results cmd to use BSS table
Jouni Malinen [Sat, 2 Jan 2010 13:19:35 +0000 (15:19 +0200)]
Convert ctrl_iface scan_results cmd to use BSS table

14 years agodbus: Use BSS table instead of raw scan results in older API
Jouni Malinen [Sat, 2 Jan 2010 13:13:25 +0000 (15:13 +0200)]
dbus: Use BSS table instead of raw scan results in older API

Change the old D-Bus API to use the new BSS table instead of raw
scan results.

14 years agoOnly expire scanned BSSes based on new scan results
Jouni Malinen [Sat, 2 Jan 2010 11:57:44 +0000 (13:57 +0200)]
Only expire scanned BSSes based on new scan results

Get more information about scans when updating BSS table information.
This allows the missing-from-scans expiration rule to work properly
when only partial set of channels or SSIDs are being scanned.

14 years agoWPS: Use BSS table instead of raw scan results
Jouni Malinen [Sat, 2 Jan 2010 11:36:12 +0000 (13:36 +0200)]
WPS: Use BSS table instead of raw scan results

14 years agodbus: Cleaned up signal message construction functions
Jouni Malinen [Sat, 2 Jan 2010 10:06:44 +0000 (12:06 +0200)]
dbus: Cleaned up signal message construction functions

14 years agodbus: Simplify _wpa_dbus_dict_fill_value_from_variant() a bit
Jouni Malinen [Sat, 2 Jan 2010 08:59:51 +0000 (10:59 +0200)]
dbus: Simplify _wpa_dbus_dict_fill_value_from_variant() a bit

14 years agodbus: Share the same function for type to type-as-string conversion
Jouni Malinen [Sat, 2 Jan 2010 08:45:03 +0000 (10:45 +0200)]
dbus: Share the same function for type to type-as-string conversion

14 years agodbus: Use common code for checking key parameter
Jouni Malinen [Sat, 2 Jan 2010 08:39:19 +0000 (10:39 +0200)]
dbus: Use common code for checking key parameter

No need to duplicate the check into many functions.

14 years agoWPS: Fix Probe Request processing to handle missing attribute
Jouni Malinen [Fri, 1 Jan 2010 21:38:51 +0000 (23:38 +0200)]
WPS: Fix Probe Request processing to handle missing attribute

WPS IE parsing for PBC mode did not check whether the UUID-E attribute
was included before dereferencing the pointer. This could result in the
AP crashing when processing and invalid Probe Request frame.

14 years agodbus: Document DebugLevel values
Jouni Malinen [Fri, 1 Jan 2010 21:17:07 +0000 (23:17 +0200)]
dbus: Document DebugLevel values

14 years agodbus: Fix WPS ProcessCredentials property setter to use Boolean
Jouni Malinen [Fri, 1 Jan 2010 21:06:10 +0000 (23:06 +0200)]
dbus: Fix WPS ProcessCredentials property setter to use Boolean

The incorrect type used with property setter call did not allow
the property to be modified.

14 years agodbus: Add debug printing on property setter type mismatches
Jouni Malinen [Fri, 1 Jan 2010 21:05:44 +0000 (23:05 +0200)]
dbus: Add debug printing on property setter type mismatches

14 years agodbus: Set ProcessCredentials to get WPS Credential signal
Jouni Malinen [Fri, 1 Jan 2010 21:04:27 +0000 (23:04 +0200)]
dbus: Set ProcessCredentials to get WPS Credential signal

14 years agodbus: Add example script for running WPS PBC
Jouni Malinen [Fri, 1 Jan 2010 20:34:15 +0000 (22:34 +0200)]
dbus: Add example script for running WPS PBC

14 years agodbus: Split wpas_dbus_handler_wps_start() into helper functions
Jouni Malinen [Fri, 1 Jan 2010 20:33:47 +0000 (22:33 +0200)]
dbus: Split wpas_dbus_handler_wps_start() into helper functions

14 years agoFix a typo in doxygen specification
Jouni Malinen [Fri, 1 Jan 2010 20:15:32 +0000 (22:15 +0200)]
Fix a typo in doxygen specification

14 years agodbus: Fix a typo in function name (invald -> invalid)
Jouni Malinen [Fri, 1 Jan 2010 19:52:29 +0000 (21:52 +0200)]
dbus: Fix a typo in function name (invald -> invalid)

14 years agonl80211/wext: Hardcode all auth_algs as supported
Jouni Malinen [Fri, 1 Jan 2010 19:41:19 +0000 (21:41 +0200)]
nl80211/wext: Hardcode all auth_algs as supported

There does not seem to be a driver interface for fetching auth_algs
capability, but this may be used by some external application, so
hardcode all auth_algs as supported for now.

14 years agodbus: Fix init-failure-detection
Jouni Malinen [Fri, 1 Jan 2010 19:30:58 +0000 (21:30 +0200)]
dbus: Fix init-failure-detection

This was broken in previous cleanup.

14 years agodbus: Cleaned up initialization and integration with eloop
Jouni Malinen [Fri, 1 Jan 2010 19:21:20 +0000 (21:21 +0200)]
dbus: Cleaned up initialization and integration with eloop

14 years agodbus: Remove perror() calls
Jouni Malinen [Fri, 1 Jan 2010 18:50:12 +0000 (20:50 +0200)]
dbus: Remove perror() calls

The perror() calls do not make much sense with libdbus functions and
wpa_printf() would really be used for all error printing anyway. In
addition, many of the error messages on out-of-memory cases are not
really of much use, so they were removed. This is also cleaning up
some of the error path handling to avoid duplicated code.

14 years agodbus: Clean up dbus_path/dbus_new_path use
Jouni Malinen [Fri, 1 Jan 2010 17:12:31 +0000 (19:12 +0200)]
dbus: Clean up dbus_path/dbus_new_path use

These cannot be NULL, so there is no point in checking for that. In
addition, the accessor function for this is just making the code harder
to understand.

14 years agodbus: Get rid of unnecessary string duplication in dbus_path
Jouni Malinen [Fri, 1 Jan 2010 16:56:07 +0000 (18:56 +0200)]
dbus: Get rid of unnecessary string duplication in dbus_path

There is no point in making it so complex to initialize a string
with two allocations and a function call.

14 years agodbus: Remove wpas_dbus_callbacks abstraction
Jouni Malinen [Fri, 1 Jan 2010 16:45:29 +0000 (18:45 +0200)]
dbus: Remove wpas_dbus_callbacks abstraction

This callback structure was specific to the new D-Bus API which makes
it more or less pointless. It is just simpler to call the notification
functions directly. More proper design could be to use a generic
mechanism for registering notification callbacks into notify.c, but
that is not yet available and should not be designed just based on a
single user.

14 years agodbus: Do not include libdbus dbus/dbus.h into dbus_{old,new}.h
Jouni Malinen [Fri, 1 Jan 2010 16:20:05 +0000 (18:20 +0200)]
dbus: Do not include libdbus dbus/dbus.h into dbus_{old,new}.h

These header files are included outside the dbus subdirectory and there
is not really any need to force the libdbus dbus/dbus.h header file to
be included into these files.

14 years agodbus: Move the SIGPOLL FreeBSD compat code into dbus_common.c
Jouni Malinen [Fri, 1 Jan 2010 16:16:24 +0000 (18:16 +0200)]
dbus: Move the SIGPOLL FreeBSD compat code into dbus_common.c

No point in storing this in header files anymore since SIGPOLL is only
used in dbus_common.c.

14 years agodbus: Get rid of unused static inline functions
Jouni Malinen [Fri, 1 Jan 2010 16:14:44 +0000 (18:14 +0200)]
dbus: Get rid of unused static inline functions

14 years agodbus: Optimize introspection to use single pass for interfaces
Jouni Malinen [Fri, 1 Jan 2010 16:08:23 +0000 (18:08 +0200)]
dbus: Optimize introspection to use single pass for interfaces

There is no need to go through methods, signals, and properties in
two loops and only collect interfaces in the first run. Get rid of
unnecessary CPU use by generating the XML data for interfaces with
a single pass.

14 years agodbus: Get rid of libxml2 dependency with introspection
Jouni Malinen [Fri, 1 Jan 2010 15:51:15 +0000 (17:51 +0200)]
dbus: Get rid of libxml2 dependency with introspection

The XML used in D-Bus introspection is simple and there is no need to use
libxml2 to generate it. This gets rid of the dependency on the large
library by using internal XML generation.

14 years agodbus: Split extract_interfaces() into helper functions
Jouni Malinen [Fri, 1 Jan 2010 13:50:00 +0000 (15:50 +0200)]
dbus: Split extract_interfaces() into helper functions

14 years agodbus: Cleanup and fix loops
Jouni Malinen [Fri, 1 Jan 2010 12:25:25 +0000 (14:25 +0200)]
dbus: Cleanup and fix loops

Simpler to use for loops instead of handling next pointer selection
in all places. In addition, couple of functions could have ended up
in an infinite loop on error path since the pointer update was missed.

14 years agodbus: Use strdup instead of malloc+strncpy
Jouni Malinen [Fri, 1 Jan 2010 12:15:12 +0000 (14:15 +0200)]
dbus: Use strdup instead of malloc+strncpy

14 years agodbus: Move introspection support into a separate file
Jouni Malinen [Fri, 1 Jan 2010 12:03:00 +0000 (14:03 +0200)]
dbus: Move introspection support into a separate file

14 years agodbus: Use CONFIG_DBUS instead of old||new
Jouni Malinen [Fri, 1 Jan 2010 11:26:56 +0000 (13:26 +0200)]
dbus: Use CONFIG_DBUS instead of old||new

14 years agodbus: Remove unnecessary ifdef CONFIG_CTRL_IFACE_DBUS_NEW
Jouni Malinen [Fri, 1 Jan 2010 11:18:37 +0000 (13:18 +0200)]
dbus: Remove unnecessary ifdef CONFIG_CTRL_IFACE_DBUS_NEW

This header file is only included if the new D-Bus API is enabled.

14 years agodbus: Fix example get-list-of-interfaces operation
Jouni Malinen [Fri, 1 Jan 2010 11:16:33 +0000 (13:16 +0200)]
dbus: Fix example get-list-of-interfaces operation

14 years agodbus: Update example script to use the new API
Jouni Malinen [Fri, 1 Jan 2010 11:10:09 +0000 (13:10 +0200)]
dbus: Update example script to use the new API

14 years agodbus: Divide DebugParams property to three separate properties
Witold Sowa [Fri, 1 Jan 2010 11:00:22 +0000 (13:00 +0200)]
dbus: Divide DebugParams property to three separate properties

14 years agodbus: Rename InterfaceCreated to InterfaceAdded
Witold Sowa [Fri, 1 Jan 2010 10:49:27 +0000 (12:49 +0200)]
dbus: Rename InterfaceCreated to InterfaceAdded

Change signal name to the one defined in documentation and
introspection data.

14 years agodbus: Add second properties arg to *Added signals
Witold Sowa [Fri, 1 Jan 2010 10:47:59 +0000 (12:47 +0200)]
dbus: Add second properties arg to *Added signals

Add a dictionary argument containing all properties of the newly added
object to BSSAdded, NetworkAdded, and InterfaceAdded signals.

14 years agodbus: Replace BSS 'Properties' property with separate properties
Witold Sowa [Fri, 1 Jan 2010 10:28:24 +0000 (12:28 +0200)]
dbus: Replace BSS 'Properties' property with separate properties

In addition, remove Quality and Noise properties since the BSS table
is not the correct place for fetching per-channel information (Noise)
and Quality is not well-defined (nor available from many drivers).

14 years agodbus: Fix get_all_properties() to handle NULL return from getter
Jouni Malinen [Fri, 1 Jan 2010 10:27:10 +0000 (12:27 +0200)]
dbus: Fix get_all_properties() to handle NULL return from getter

This needs to avoid trying to add the NULL entry into the D-Bus
message since libdbus will make the program terminate in such a case.

14 years agodbus: Add generic properties getter and setter
Witold Sowa [Fri, 1 Jan 2010 09:56:56 +0000 (11:56 +0200)]
dbus: Add generic properties getter and setter

14 years agodbus: Define priv argument for object rather than for method
Witold Sowa [Fri, 1 Jan 2010 09:33:41 +0000 (11:33 +0200)]
dbus: Define priv argument for object rather than for method

We don't actually need to define separate user_data argument for
each method handler and property getter/setter. Instead, we can define
one argument for the whole object. That will make it easier to register
objects like BSS or Networks which require allocating and freeing
memory for their arguments.

14 years agodbus: Add example script for fetching all properties with Getall
Jouni Malinen [Fri, 1 Jan 2010 09:00:11 +0000 (11:00 +0200)]
dbus: Add example script for fetching all properties with Getall

14 years agodbus: Rename old D-Bus API files to include "_old"
Jouni Malinen [Thu, 31 Dec 2009 19:55:32 +0000 (21:55 +0200)]
dbus: Rename old D-Bus API files to include "_old"

This makes it easier to figure out which file is used by which
D-Bus interface.

14 years agodbus: Do not deinitialize new D-Bus API if it is not initialized
Jouni Malinen [Thu, 31 Dec 2009 19:50:12 +0000 (21:50 +0200)]
dbus: Do not deinitialize new D-Bus API if it is not initialized

This fixes a crash on error path when D-Bus initialization fails.

14 years agodbus: Share common initialization code for both old and new interface
Jouni Malinen [Wed, 30 Dec 2009 22:15:56 +0000 (00:15 +0200)]
dbus: Share common initialization code for both old and new interface

This was mostly identical code that had been copied for the new D-Bus
API implementation and as such, should really have been shared from
the beginning. In addition, the copied code ended up generating
interesting stack traces since the actual D-Bus connection was being
shared even though the pointer to it was stored in two distinct
data structures. The old D-Bus code ended up dispatching some
D-Bus callbacks which ended up running the new D-Bus code.

Since the private context pointers were mostly identical, everything
seemed to more or less work, but this design was just making things
more complex and potentially very easy to break.

14 years agoFix couple of memory leaks in wpa_config_get_all()
Jouni Malinen [Wed, 30 Dec 2009 20:37:23 +0000 (22:37 +0200)]
Fix couple of memory leaks in wpa_config_get_all()