mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
connman: fully disable wispr
This commit is contained in:
parent
70f845f830
commit
2d81c43240
167
packages/network/connman/patches/connman-disable-wispr.patch
Normal file
167
packages/network/connman/patches/connman-disable-wispr.patch
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index 4b1b6c2..d518d5d 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -172,6 +172,7 @@ endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
|
||||||
|
+ @WISPR_CFLAGS@ \
|
||||||
|
@GNUTLS_CFLAGS@ $(builtin_cflags) \
|
||||||
|
-DCONNMAN_PLUGIN_BUILTIN \
|
||||||
|
-DSTATEDIR=\""$(statedir)"\" \
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index cff8b47..626137a 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -357,13 +357,17 @@ AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
|
||||||
|
if (test "${enable_wispr}" != "no"); then
|
||||||
|
PKG_CHECK_MODULES(GNUTLS, gnutls, dummy=yes,
|
||||||
|
AC_MSG_ERROR(GnuTLS library is required))
|
||||||
|
+ WISPR_CFLAGS="-DENABLE_WISPR"
|
||||||
|
else
|
||||||
|
GNUTLS_CFLAGS=""
|
||||||
|
GNUTLS_LIBS=""
|
||||||
|
+ WISPR_CFLAGS=""
|
||||||
|
fi
|
||||||
|
AC_SUBST(GNUTLS_CFLAGS)
|
||||||
|
AC_SUBST(GNUTLS_LIBS)
|
||||||
|
|
||||||
|
+AC_SUBST(WISPR_CFLAGS)
|
||||||
|
+
|
||||||
|
if (test "${enable_loopback}" != "no"); then
|
||||||
|
AC_CHECK_HEADERS(sys/inotify.h, dummy=yes,
|
||||||
|
AC_MSG_ERROR(inotify header files are required))
|
||||||
|
diff --git a/src/main.c b/src/main.c
|
||||||
|
index 0d58fc4..9c3b79e 100644
|
||||||
|
--- a/src/main.c
|
||||||
|
+++ b/src/main.c
|
||||||
|
@@ -689,7 +689,9 @@ int main(int argc, char *argv[])
|
||||||
|
__connman_dhcp_init();
|
||||||
|
__connman_dhcpv6_init();
|
||||||
|
__connman_wpad_init();
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_init();
|
||||||
|
+#endif
|
||||||
|
__connman_rfkill_init();
|
||||||
|
|
||||||
|
g_free(option_config);
|
||||||
|
@@ -703,7 +705,9 @@ int main(int argc, char *argv[])
|
||||||
|
g_source_remove(signal);
|
||||||
|
|
||||||
|
__connman_rfkill_cleanup();
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_cleanup();
|
||||||
|
+#endif
|
||||||
|
__connman_wpad_cleanup();
|
||||||
|
__connman_dhcpv6_cleanup();
|
||||||
|
__connman_dhcp_cleanup();
|
||||||
|
diff --git a/src/service.c b/src/service.c
|
||||||
|
index bba548e..39ffda2 100644
|
||||||
|
--- a/src/service.c
|
||||||
|
+++ b/src/service.c
|
||||||
|
@@ -3155,6 +3155,7 @@ static DBusMessage *set_property(DBusConnection *conn,
|
||||||
|
update_nameservers(service);
|
||||||
|
dns_configuration_changed(service);
|
||||||
|
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
if (__connman_service_is_connected_state(service,
|
||||||
|
CONNMAN_IPCONFIG_TYPE_IPV4))
|
||||||
|
__connman_wispr_start(service,
|
||||||
|
@@ -3164,6 +3165,7 @@ static DBusMessage *set_property(DBusConnection *conn,
|
||||||
|
CONNMAN_IPCONFIG_TYPE_IPV6))
|
||||||
|
__connman_wispr_start(service,
|
||||||
|
CONNMAN_IPCONFIG_TYPE_IPV6);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
service_save(service);
|
||||||
|
} else if (g_str_equal(name, "Timeservers.Configuration") == TRUE) {
|
||||||
|
@@ -4272,7 +4274,9 @@ static void service_free(gpointer user_data)
|
||||||
|
__connman_notifier_service_remove(service);
|
||||||
|
service_schedule_removed(service);
|
||||||
|
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_stop(service);
|
||||||
|
+#endif
|
||||||
|
stats_stop(service);
|
||||||
|
|
||||||
|
service->path = NULL;
|
||||||
|
@@ -5236,8 +5240,9 @@ static int service_indicate_state(struct connman_service *service)
|
||||||
|
|
||||||
|
default_changed();
|
||||||
|
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_stop(service);
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
__connman_wpad_stop(service);
|
||||||
|
|
||||||
|
update_nameservers(service);
|
||||||
|
@@ -5386,7 +5391,11 @@ static void check_proxy_setup(struct connman_service *service)
|
||||||
|
return;
|
||||||
|
|
||||||
|
done:
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_start(service, CONNMAN_IPCONFIG_TYPE_IPV4);
|
||||||
|
+#else
|
||||||
|
+ return;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -5448,7 +5457,9 @@ static gboolean redo_wispr(gpointer user_data)
|
||||||
|
|
||||||
|
DBG("");
|
||||||
|
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_start(service, CONNMAN_IPCONFIG_TYPE_IPV6);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
@@ -5474,7 +5485,9 @@ int __connman_service_online_check_failed(struct connman_service *service,
|
||||||
|
* necessary IPv6 router advertisement messages that might have
|
||||||
|
* DNS data etc.
|
||||||
|
*/
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
g_timeout_add_seconds(1, redo_wispr, service);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
return EAGAIN;
|
||||||
|
}
|
||||||
|
@@ -5529,7 +5542,9 @@ int __connman_service_ipconfig_indicate_state(struct connman_service *service,
|
||||||
|
service_rp_filter(service, TRUE);
|
||||||
|
} else {
|
||||||
|
service->online_check_count = 1;
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_start(service, type);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CONNMAN_SERVICE_STATE_ONLINE:
|
||||||
|
diff --git a/src/wpad.c b/src/wpad.c
|
||||||
|
index 4e5834e..8be310f 100644
|
||||||
|
--- a/src/wpad.c
|
||||||
|
+++ b/src/wpad.c
|
||||||
|
@@ -85,8 +85,10 @@ static void wpad_result(GResolvResultStatus status,
|
||||||
|
|
||||||
|
g_free(url);
|
||||||
|
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_start(wpad->service,
|
||||||
|
CONNMAN_IPCONFIG_TYPE_IPV4);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@@ -117,8 +119,10 @@ failed:
|
||||||
|
connman_service_set_proxy_method(wpad->service,
|
||||||
|
CONNMAN_SERVICE_PROXY_METHOD_DIRECT);
|
||||||
|
|
||||||
|
+#ifdef ENABLE_WISPR
|
||||||
|
__connman_wispr_start(wpad->service,
|
||||||
|
CONNMAN_IPCONFIG_TYPE_IPV4);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
int __connman_wpad_start(struct connman_service *service)
|
Loading…
x
Reference in New Issue
Block a user