path: root/wpa_supplicant/dbus/dbus_new.h
diff options
authorJouni Malinen <j@w1.fi>2009-12-30 22:15:56 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-30 22:15:56 (GMT)
commit8ddef94bd41747ba658ed4ed5dfa9e62b4b84cfa (patch)
treee47378c8bc1702199eb3200a701fe291b8336f10 /wpa_supplicant/dbus/dbus_new.h
parent0474686514ac2ba80b352792b034eec63ca6886e (diff)
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.
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new.h')
1 files changed, 4 insertions, 5 deletions
diff --git a/wpa_supplicant/dbus/dbus_new.h b/wpa_supplicant/dbus/dbus_new.h
index 7ec4560..699fa4e 100644
--- a/wpa_supplicant/dbus/dbus_new.h
+++ b/wpa_supplicant/dbus/dbus_new.h
@@ -22,6 +22,7 @@ struct wpa_ssid;
struct wps_event_m2d;
struct wps_event_fail;
struct wps_credential;
+enum wpa_states;
enum wpas_dbus_prop {
@@ -31,11 +32,6 @@ enum wpas_dbus_prop {
struct wpas_dbus_callbacks {
- struct ctrl_iface_dbus_new_priv * (*dbus_ctrl_init)(
- struct wpa_global *global);
- void (*dbus_ctrl_deinit)(struct ctrl_iface_dbus_new_priv *iface);
void (*signal_interface_created)(struct wpa_supplicant *wpa_s);
void (*signal_interface_removed)(struct wpa_supplicant *wpa_s);
@@ -127,6 +123,9 @@ struct wpas_dbus_callbacks {
struct wpas_dbus_callbacks * wpas_dbus_get_callbacks(void);
const char * wpas_dbus_get_path(struct wpa_supplicant *wpa_s);
+int wpas_dbus_ctrl_iface_init(struct wpas_dbus_priv *priv);
+void wpas_dbus_ctrl_iface_deinit(struct wpas_dbus_priv *iface);
static inline struct wpas_dbus_callbacks * wpas_dbus_get_callbacks(void)