New D-Bus API and Config File

Phillip Nixon phillipnixon49
Tue Jan 5 15:03:13 PST 2010


Jouni: Thanks for the reply.

I will try out your ideas and create a patch once I get everything
working. It seems that the wpa_config_write() calls with the
wpa_s->conf->update_config check should go everywhere in the D-Bus
code where one is able to add/edit/delete properties (via the wpa
interfaces or the org.freedesktop.DBus.Properties). Most of these
changes seem very straightforward, one question though: What course of
action should be taken when wpa_config_write() fails? As the example
case, consider adding a new network. If the network is successfully
added, but wpa_config_write() fails I see:

1) Return success. Ignore error.
2) Add a new error return for every method call that could fail via
wpa_config_write(), but keep the changes that went through.
3) Back out the changes, return error code.

Thoughts? Thanks.

Phillip

On Tue, Jan 5, 2010 at 2:45 PM, Jouni Malinen <j at w1.fi> wrote:
> On Tue, Jan 05, 2010 at 01:28:04PM -0500, Phillip Nixon wrote:
>
>> I am implementing a gui applet (similiar in wireless functionality to
>> Network Manager) using the new D-Bus API. I would like to be able to have a
>> user enter a PSK for a new network, and then write that network block into
>> wpa_supplicant's configuration file. Are any plans to allow the D-Bus API to
>> do that?
>
> I haven't tested this, but I would assume that it almost works already,
> i.e., add update_config=1 to the configuration file and start
> wpa_supplicant with -u and -c options on the command line. The "almost"
> there is because of one function call potentially missing
> (wpa_config_write() to be called if wpa_s->conf->update_config is set).
> It should be fine to add this into the D-Bus code at the place where a
> new network is added. It wouldn't change the behavior for existing
> clients (i.e., you do need to use a config file with update_config=1 to
> be able to use this).
>
> --
> Jouni Malinen ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>



More information about the Hostap mailing list