- Fixed NTP service's DNS resolving failure in Hive project.
- Do not turn "wlan0" interface down in cleanup_devices().
- Set resource limits "RLIMIT_NOFILE" for a process.
- After appending a file, fflush and fsync all modified in-core data of the file.
Change-Id: I2767b3302d6204d066fe2075027828ff209d0ee0
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
nameserver->flags = flags;
nameserver->resolv = resolv;
+ debug(resolv, "");
if (connect_udp_channel(nameserver) < 0) {
free_nameserver(nameserver);
return false;
}
+ debug(resolv, "");
resolv->nameserver_list = g_list_append(resolv->nameserver_list,
nameserver);
lookup->result_data = user_data;
lookup->id = resolv->next_lookup_id++;
+ debug(resolv, "");
+
if (resolv->result_family != AF_INET6) {
if (add_query(lookup, hostname, ns_t_a)) {
g_free(lookup);
}
}
+ debug(resolv, "");
+
if (resolv->result_family != AF_INET) {
if (add_query(lookup, hostname, ns_t_aaaa)) {
if (resolv->result_family != AF_INET6) {
}
}
+ debug(resolv, "");
+
g_queue_push_tail(resolv->lookup_queue, lookup);
debug(resolv, "lookup %p id %d", lookup, lookup->id);
}
if (!found) {
+#if defined TIZEN_EXT
+ if (data->ipv4_gateway != NULL){
+ set_default_gateway(data, CONNMAN_IPCONFIG_TYPE_IPV4);
+ connman_check_proxy_setup_and_wispr_start(data->service);
+ }
+#else
if (data->ipv4_gateway)
set_default_gateway(data, CONNMAN_IPCONFIG_TYPE_IPV4);
+#endif
if (data->ipv6_gateway)
set_default_gateway(data, CONNMAN_IPCONFIG_TYPE_IPV6);
struct connman_service *service,
enum connman_ipconfig_type type);
+#if defined TIZEN_EXT
+void connman_check_proxy_setup_and_wispr_start(struct connman_service *service);
+#endif
+
int __connman_service_indicate_error(struct connman_service *service,
enum connman_service_error error);
int __connman_service_clear_error(struct connman_service *service);
DBG("cleaning up %s index %d", interfaces[i], index);
+#if defined TIZEN_EXT
+ if (strcmp(interfaces[i], "wlan0") != 0)
+#endif
connman_inet_ifdown(index);
/*
if (error != G_DHCP_CLIENT_ERROR_NONE)
return -EINVAL;
+#if !defined TIZEN_EXT
if (getenv("CONNMAN_DHCP_DEBUG")) {
+#endif
dhcp->ipv4ll_debug_prefix = g_strdup_printf("IPv4LL index %d",
index);
g_dhcp_client_set_debug(ipv4ll_client, dhcp_debug,
dhcp->ipv4ll_debug_prefix);
+#if !defined TIZEN_EXT
}
+#endif
g_dhcp_client_set_id(ipv4ll_client);
if (error != G_DHCP_CLIENT_ERROR_NONE)
return -EINVAL;
+#if !defined TIZEN_EXT
if (getenv("CONNMAN_DHCP_DEBUG")) {
+#endif
dhcp->dhcp_debug_prefix = g_strdup_printf("DHCP index %d",
index);
g_dhcp_client_set_debug(dhcp_client, dhcp_debug,
dhcp->dhcp_debug_prefix);
+#if !defined TIZEN_EXT
}
+#endif
g_dhcp_client_set_id(dhcp_client);
#include <string.h>
#include <signal.h>
#include <sys/signalfd.h>
+#include <sys/types.h>
+#include <sys/resource.h>
#include <getopt.h>
#include <sys/stat.h>
#include <net/if.h>
g_clear_error(&error);
}
+
+static void set_nofile_inc(void)
+{
+ int err;
+ struct rlimit rlim;
+
+ rlim.rlim_cur = 8192;
+ rlim.rlim_max = 8192;
+
+ err = setrlimit(RLIMIT_NOFILE, &rlim);
+ if (err)
+ DBG("fail to increase FILENO err(%d)", err);
+
+ return;
+}
#endif
static void parse_config(GKeyFile *config)
{
GKeyFile *config;
+#if defined TIZEN_EXT
+ set_nofile_inc();
+#endif
config = load_config(file);
check_config(config);
parse_config(config);
if (!server && !domain)
return -EINVAL;
+#ifdef TIZEN_EXT
+ if (g_strcmp0(server, "0.0.0.0") == 0)
+ return -EINVAL;
+#endif
+
entry = g_try_new0(struct entry_data, 1);
if (!entry)
return -ENOMEM;
__connman_wispr_start(service, CONNMAN_IPCONFIG_TYPE_IPV4);
}
+#if defined TIZEN_EXT
+void connman_check_proxy_setup_and_wispr_start(struct connman_service *service){
+
+ DBG("check the proxy and start wispr");
+ check_proxy_setup(service);
+ return;
+}
+#endif
+
/*
* How many networks are connected at the same time. If more than 1,
* then set the rp_filter setting properly (loose mode routing) so that network
}
#endif
if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
+#if !defined TIZEN_EXT
check_proxy_setup(service);
+#endif
service_rp_filter(service, true);
} else {
service->online_check_count = 1;
#include <config.h>
#endif
+#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
ret = -EIO;
}
+#if defined TIZEN_EXT
+ {
+ FILE *fp = NULL;
+ fp = fopen(pathname, "a+");
+ if(fp){
+ fflush(fp);
+ fsync(fp->_fileno);
+ fclose(fp);
+ DBG("sync the file to disk");
+ }
+ }
+#endif
+
g_free(data);
return ret;
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) {
return -ENOMEM;
}
+#if !defined TIZEN_EXT
if (getenv("CONNMAN_RESOLV_DEBUG"))
+#endif
g_resolv_set_debug(wpad->resolv, resolv_debug, "RESOLV");
for (i = 0; nameservers[i]; i++)