On Tue, 22 Oct 2013 10:37:15 -0200 Gustavo Sverzut Barbieri <barbi...@gmail.com> said:
> On Tue, Oct 22, 2013 at 4:56 AM, Carsten Haitzler <ras...@rasterman.com> > wrote: > > raster pushed a commit to branch master. > > > > http://git.enlightenment.org/core/enlightenment.git/commit/?id=5f60606ffe456b063cc8c6391ec11bcf6179a3ff > > > > commit 5f60606ffe456b063cc8c6391ec11bcf6179a3ff > > Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com> > > Date: Tue Oct 22 07:54:38 2013 +0100 > > > > connman - tenatively add remove api - needs hooking into ui for "forget" > > --- > > src/modules/connman/E_Connman.h | 2 ++ > > src/modules/connman/e_connman.c | 48 ++++++++++++++++++++++++++++++++++ > > +------ 2 files changed, 44 insertions(+), 6 deletions(-) > > > > diff --git a/src/modules/connman/E_Connman.h > > b/src/modules/connman/E_Connman.h index 272233b..3e58d46 100644 > > --- a/src/modules/connman/E_Connman.h > > +++ b/src/modules/connman/E_Connman.h > > @@ -69,6 +69,7 @@ struct Connman_Service > > { > > Eldbus_Pending *connect; > > Eldbus_Pending *disconnect; > > + Eldbus_Pending *remov; > > void *data; > > } pending; > > }; > > @@ -93,6 +94,7 @@ typedef void (*Econnman_Simple_Cb)(void *data, const char > > *error); > > > > bool econnman_service_connect(struct Connman_Service *cs, > > Econnman_Simple_Cb cb, void *data); bool econnman_service_disconnect(struct > > Connman_Service *cs, Econnman_Simple_Cb cb, void *data); +bool > > econnman_service_remove(struct Connman_Service *cs, Econnman_Simple_Cb cb, > > void *data); > > > > void econnman_powered_set(struct Connman_Manager *cm, Eina_Bool powered); > > > > diff --git a/src/modules/connman/e_connman.c > > b/src/modules/connman/e_connman.c index 29649a9..b0113bd 100644 > > --- a/src/modules/connman/e_connman.c > > +++ b/src/modules/connman/e_connman.c > > @@ -247,6 +247,11 @@ static void _service_free(struct Connman_Service *cs) > > eldbus_pending_cancel(cs->pending.disconnect); > > free(cs->pending.data); > > } > > + if (cs->pending.remov) > > + { > > + eldbus_pending_cancel(cs->pending.remov); > > + free(cs->pending.data); > > + } > > > > free(cs->name); > > _eina_str_array_clean(cs->security); > > @@ -294,6 +299,7 @@ static void _service_connection_cb(void *data, const > > Eldbus_Message *msg, > > > > cd->cs->pending.connect = NULL; > > cd->cs->pending.disconnect = NULL; > > + cd->cs->pending.remov = NULL; > > cd->cs->pending.data = NULL; > > > > free(cd); > > @@ -306,10 +312,10 @@ bool econnman_service_connect(struct Connman_Service > > *cs, > > > > EINA_SAFETY_ON_NULL_RETURN_VAL(cs, false); > > > > - if (cs->pending.connect || cs->pending.disconnect) > > + if (cs->pending.connect || cs->pending.disconnect || cs->pending.remov) > > { > > - ERR("Pending connection: connect=%p disconnect=%p", > > cs->pending.connect, > > - cs->pending.disconnect); > > + ERR("Pending connection: connect=%p disconnect=%p remov=%p", > > cs->pending.connect, > > + cs->pending.disconnect, cs->pending.remov); > > return false; > > } > > > > @@ -336,10 +342,10 @@ bool econnman_service_disconnect(struct > > Connman_Service *cs, > > > > EINA_SAFETY_ON_NULL_RETURN_VAL(cs, false); > > > > - if (cs->pending.connect || cs->pending.disconnect) > > + if (cs->pending.connect || cs->pending.disconnect || cs->pending.remov) > > { > > - ERR("Pending connection: connect=%p disconnect=%p", > > cs->pending.connect, > > - cs->pending.disconnect); > > + ERR("Pending connection: connect=%p disconnect=%p remov=%p", > > cs->pending.connect, > > + cs->pending.disconnect, cs->pending.remov); > > return false; > > } > > > > @@ -359,6 +365,36 @@ fail: > > return false; > > } > > > > +bool econnman_service_remove(struct Connman_Service *cs, > > + Econnman_Simple_Cb cb, void *data) > > +{ > > + struct connection_data *cd; > > + > > + EINA_SAFETY_ON_NULL_RETURN_VAL(cs, false); > > + > > + if (cs->pending.connect || cs->pending.disconnect || cs->pending.remov) > > + { > > + ERR("Pending connection: connect=%p disconnect=%p remov=%p", > > cs->pending.connect, > > + cs->pending.disconnect, cs->pending.remov); > > + return false; > > + } > > + > > + cd = calloc(1, sizeof(*cd)); > > + EINA_SAFETY_ON_NULL_GOTO(cd, fail); > > + > > + cd->cs = cs; > > + cd->cb = cb; > > + cd->user_data = data; > > + > > + cs->pending.connect = eldbus_proxy_call(cs->service_iface, "Remove", > > + _service_connection_cb, cd, > > + -1, ""); > > copy and pasta too much? it should be pending.remov :-D thanks. missed that. hadn't tested it. just at linuxcon and i hit the problem that i had an old config for the same essid with a diff passwd and i waned to forget it.... connman didnt connect until i manually removed the file(s) for that essid and i got to re-enter the passwd. -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel