connman: remove unneeded patch

This commit is contained in:
Lukas Rusak 2016-11-18 09:51:35 -08:00
parent d9713afba3
commit e368a86aa3
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3

View File

@ -1,170 +0,0 @@
diff --git a/Makefile.am b/Makefile.am
index 5efa811..054d7ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -184,6 +184,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 27add27..808611c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,12 +345,15 @@ 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,
diff --git a/src/main.c b/src/main.c
index 5eeade5..20653d3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -681,7 +681,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);
@@ -695,7 +697,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 45d817e..94cb197 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3164,6 +3164,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,
@@ -3173,6 +3174,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")) {
@@ -4352,7 +4354,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;
@@ -5331,7 +5335,9 @@ static int service_indicate_state(struct connman_service *service)
default_changed();
+#ifdef ENABLE_WISPR
__connman_wispr_stop(service);
+#endif
__connman_wpad_stop(service);
@@ -5498,7 +5504,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
}
/*
@@ -5554,6 +5564,7 @@ static void service_rp_filter(struct connman_service *service,
connected_networks_count, original_rp_filter);
}
+#ifdef ENABLE_WISPR
static gboolean redo_wispr(gpointer user_data)
{
struct connman_service *service = user_data;
@@ -5569,6 +5580,7 @@ static gboolean redo_wispr(gpointer user_data)
return FALSE;
}
+#endif
int __connman_service_online_check_failed(struct connman_service *service,
enum connman_ipconfig_type type)
@@ -5591,7 +5603,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, connman_service_ref(service));
+#endif
return EAGAIN;
}
@@ -5646,7 +5660,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 d40959b..62faf92 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)