summaryrefslogtreecommitdiff
path: root/src/wispr.c
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-09-28 15:41:06 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-01 13:16:53 +0300
commit9d811818d9cd01869af99d394b310f67d3d17299 (patch)
tree35853feece754884bdf0dbef515370578b006b25 /src/wispr.c
parentb1a3b1a457010d2495b20e836331106c6758fb96 (diff)
downloadconnman-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.c14
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;