DBG("Failed to proceed wispr/portal web request");
wp_context->wispr_result = CONNMAN_WISPR_RESULT_FAILED;
+
+#if defined TIZEN_EXT
+ connman_service_set_internet_connection(wp_context->service, false);
+#endif
}
static void portal_manage_status(GWebResult *result,
const char *error, void *user_data)
{
struct connman_wispr_portal_context *wp_context = user_data;
+ struct connman_wispr_portal *wispr_portal;
+ int index;
DBG("");
if (!service || !wp_context)
return;
+ /*
+ * No way to cancel this if wp_context has been freed, so we lookup
+ * from the service and check that this is still the right context.
+ */
+ index = __connman_service_get_index(service);
+ if (index < 0)
+ return;
+
+ wispr_portal = g_hash_table_lookup(wispr_portal_list,
+ GINT_TO_POINTER(index));
+ if (!wispr_portal)
+ return;
+
+ if (wp_context != wispr_portal->ipv4_context &&
+ wp_context != wispr_portal->ipv6_context)
+ return;
+
if (!authentication_done) {
wispr_portal_error(wp_context);
free_wispr_routes(wp_context);
const char *str = NULL;
guint16 status;
gsize length;
+#if defined TIZEN_MAINTAIN_ONLINE
+ static int retried = 0;
+#endif
DBG("");
wp_context->status_url, wp_context);
break;
case 200:
+#if defined TIZEN_MAINTAIN_ONLINE
+ retried = 0;
+#endif
if (wp_context->wispr_msg.message_type >= 0)
break;
case 404:
if (__connman_service_online_check_failed(wp_context->service,
wp_context->type) == 0) {
+#if defined TIZEN_MAINTAIN_ONLINE
+ if (wp_context->type == CONNMAN_IPCONFIG_TYPE_IPV4) {
+ if (retried == 0) {
+ connman_agent_report_error(wp_context->service,
+ __connman_service_get_path(wp_context->service),
+ "internet-unreachable",
+ NULL, NULL, NULL);
+
+ retried = 1;
+ }
+ break;
+ }
+#endif
wispr_portal_error(wp_context);
free_connman_wispr_portal_context(wp_context);
return false;
case CONNMAN_SERVICE_TYPE_GPS:
case CONNMAN_SERVICE_TYPE_VPN:
case CONNMAN_SERVICE_TYPE_P2P:
+#if defined TIZEN_EXT_WIFI_MESH
+ case CONNMAN_SERVICE_TYPE_MESH:
+#endif
return -EOPNOTSUPP;
}
goto done;
}
+#if !defined TIZEN_EXT
if (getenv("CONNMAN_WEB_DEBUG"))
+#endif
g_web_set_debug(wp_context->web, web_debug, "WEB");
if (wp_context->type == CONNMAN_IPCONFIG_TYPE_IPV4) {
DBG("service %p", service);
+#if defined TIZEN_EXT
+ if (connman_service_get_type(service) == CONNMAN_SERVICE_TYPE_CELLULAR)
+ return -EPERM;
+#endif
+
if (!wispr_portal_list)
return -EINVAL;