diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2012-09-28 15:41:06 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-10-01 13:16:53 +0300 |
commit | 9d811818d9cd01869af99d394b310f67d3d17299 (patch) | |
tree | 35853feece754884bdf0dbef515370578b006b25 /src/wispr.c | |
parent | b1a3b1a457010d2495b20e836331106c6758fb96 (diff) | |
download | connman-9d811818d9cd01869af99d394b310f67d3d17299.tar.gz connman-9d811818d9cd01869af99d394b310f67d3d17299.tar.bz2 connman-9d811818d9cd01869af99d394b310f67d3d17299.zip |
wispr: Properly handle Agent error
Diffstat (limited to 'src/wispr.c')
-rw-r--r-- | src/wispr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/wispr.c b/src/wispr.c index 879f9061..7ee51886 100644 --- a/src/wispr.c +++ b/src/wispr.c @@ -567,13 +567,15 @@ static void wispr_portal_request_wispr_login(struct connman_service *service, DBG(""); - if (error != NULL && g_strcmp0(error, + if (error != NULL) { + if (g_strcmp0(error, "net.connman.Agent.Error.LaunchBrowser") == 0) { - - if (__connman_agent_request_browser(service, - wispr_portal_browser_reply_cb, - wp_context->redirect_url, - wp_context) != -EINPROGRESS) + if (__connman_agent_request_browser(service, + wispr_portal_browser_reply_cb, + wp_context->redirect_url, + wp_context) != -EINPROGRESS) + free_connman_wispr_portal_context(wp_context); + } else free_connman_wispr_portal_context(wp_context); return; |