dbus: Share common initialization code for both old and new interface
authorJouni Malinen <j@w1.fi>
Wed, 30 Dec 2009 22:15:56 +0000 (00:15 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 30 Dec 2009 22:15:56 +0000 (00:15 +0200)
commit8ddef94bd41747ba658ed4ed5dfa9e62b4b84cfa
treee47378c8bc1702199eb3200a701fe291b8336f10
parent0474686514ac2ba80b352792b034eec63ca6886e
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.
13 files changed:
wpa_supplicant/Makefile
wpa_supplicant/dbus/dbus.c
wpa_supplicant/dbus/dbus.h
wpa_supplicant/dbus/dbus_common.c [new file with mode: 0644]
wpa_supplicant/dbus/dbus_common.h [new file with mode: 0644]
wpa_supplicant/dbus/dbus_common_i.h [new file with mode: 0644]
wpa_supplicant/dbus/dbus_new.c
wpa_supplicant/dbus/dbus_new.h
wpa_supplicant/dbus/dbus_new_handlers_wps.c
wpa_supplicant/dbus/dbus_new_helpers.c
wpa_supplicant/dbus/dbus_new_helpers.h
wpa_supplicant/notify.c
wpa_supplicant/wpa_supplicant_i.h