On Wed, Jul 4, 2012 at 4:09 AM, Jukka Rissanen <[email protected]> wrote: > Hi Gustavo, > > > On 07/04/2012 03:06 AM, Gustavo Sverzut Barbieri wrote: >> >> I'm implementing a GUI for ConnMan in EFL and I've noticed a strange >> behavior: >> >> 1 - launch an agent that returns error (net.connman.Agent.Error.Canceled) >> 2 - call Connect() on a service that triggers RequestInput >> 3 - return an error from agent. >> 4 - Connect() is not notified >> >> Problem seems to be it calls __connman_service_return_error() that will >> call: >> >> __connman_service_set_hidden_data(service, user_data); >> reply_pending(service, error); >> >> but in __connman_service_set_hidden_data(service, user_data) it does: >> DBusMessage *pending = user_data; >> service->pending = pending; >> >> however my log shows user_data is NULL. Then effectivly "set hidden >> data" is removing pending call, then no Connect() is aborted. See log: >> >> connmand[24834]: src/service.c:request_input_cb() RequestInput return, >> 0x1419400 >> connmand[24834]: src/service.c:request_input_cb() error: >> net.connman.Agent.Error.Canceled >> connmand[24834]: src/service.c:__connman_service_return_error() >> service 0x1419400 error 22 user_data (nil) >> connmand[24834]: src/service.c:__connman_service_set_hidden_data() >> service 0x1419400 pending (nil) >> connmand[24834]: src/service.c:check_pending_msg() service 0x1419400 >> pending msg 0x13feda0 already exists >> >> (no log for reply_pending() as it does not have it) >> >> I'm not aware why user_data is NULL or why it's doing "set hidden >> data" before replying with error. >> >> If I change set hidden data *AFTER* reply_pending(), then it works as >> in the attached patch. >> >> > >> @@ -3455,9 +3455,9 @@ void __connman_service_return_error(struct >> connman_service *service, >> { >> DBG("service %p error %d user_data %p", service, error, >> user_data); >> >> - __connman_service_set_hidden_data(service, user_data); >> - >> reply_pending(service, error); >> + >> + __connman_service_set_hidden_data(service, user_data); >> } >> > > Unfortunately this will not work when connecting to hidden network because > there we need to set the hidden data before replying the user (otherwise the > user would not get any reply at all). See patches b8162e19c, 3ca789e4 and > fc41a185 for more details. > > I try to check if there are any other solutions to the problem.
Yeah, I've checked some of those and was confused as I explained in my mail. The issue right now as it breaks a very common case that is clicking a wrong network, it will ask for password and you cancel. (It annoys me so much because I wrote an Agent and had to test the GUI... and the connection got stuck) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
