From: Tomasz Bursztyka Date: Fri, 28 Sep 2012 12:41:06 +0000 (+0300) Subject: wispr: Properly handle Agent error X-Git-Tag: 1.8~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d811818d9cd01869af99d394b310f67d3d17299;p=platform%2Fupstream%2Fconnman.git wispr: Properly handle Agent error --- 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;