summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinclude/log.h12
-rwxr-xr-xsrc/connman.h3
-rwxr-xr-xsrc/log.c24
-rwxr-xr-xsrc/main.c15
-rwxr-xr-xsrc/service.c9
5 files changed, 52 insertions, 11 deletions
diff --git a/include/log.h b/include/log.h
index 7687ed0b..9403633d 100755
--- a/include/log.h
+++ b/include/log.h
@@ -22,6 +22,10 @@
#ifndef __CONNMAN_LOG_H
#define __CONNMAN_LOG_H
+#if defined TIZEN_EXT
+#include <stdbool.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -86,6 +90,14 @@ struct connman_debug_desc {
__FILE__, __FUNCTION__ , ## arg); \
} while (0)
+#if defined TIZEN_EXT
+#define simplified_log get_simple_log_option()
+bool get_simple_log_option(void);
+void set_simple_log_option(bool option);
+void set_dlog_logging_option(bool option);
+void set_file_logging_option(bool option);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/src/connman.h b/src/connman.h
index 14ddcc2d..38242712 100755
--- a/src/connman.h
+++ b/src/connman.h
@@ -1227,9 +1227,6 @@ int __connman_util_init(void);
void __connman_util_cleanup(void);
#ifdef TIZEN_EXT
-__attribute__ ((unused)) static bool dlog_logging = true;
-__attribute__ ((unused)) static bool file_logging = true;
-__attribute__ ((unused)) static bool simplified_log = true;
__attribute__ ((unused)) static int __tizentvextension = -1;
#define TIZEN_TV_EXT (__builtin_expect(__tizentvextension != -1, 1) ? \
__tizentvextension : \
diff --git a/src/log.c b/src/log.c
index 8dbbb04b..7a4839bf 100755
--- a/src/log.c
+++ b/src/log.c
@@ -40,6 +40,7 @@ static const char *program_path;
#if defined TIZEN_EXT
#include <sys/stat.h>
#include <sys/time.h>
+#include <stdbool.h>
#include <dlog.h>
#undef LOG_TAG
@@ -55,6 +56,29 @@ static const char *program_path;
#define syslog __connman_log_s
static FILE *log_file = NULL;
+static bool dlog_logging = true;
+static bool file_logging = true;
+static bool simple_log = true;
+
+bool get_simple_log_option(void)
+{
+ return simple_log;
+}
+
+void set_simple_log_option(bool option)
+{
+ simple_log = option;
+}
+
+void set_dlog_logging_option(bool option)
+{
+ dlog_logging = option;
+}
+
+void set_file_logging_option(bool option)
+{
+ file_logging = option;
+}
void __connman_log_open(const char *ident, int option, int facility)
{
diff --git a/src/main.c b/src/main.c
index 0821c45b..34d572db 100755
--- a/src/main.c
+++ b/src/main.c
@@ -106,7 +106,7 @@ static struct {
char *def_wifi_ifname;
bool file_log;
bool dlog_log;
- bool simplified_log;
+ bool simple_log;
#endif
} connman_settings = {
.bg_scan = true,
@@ -139,7 +139,7 @@ static struct {
.def_wifi_ifname = DEFAULT_WIFI_INTERFACE,
.file_log = true,
.dlog_log = true,
- .simplified_log = true,
+ .simple_log = true,
#endif
};
@@ -695,7 +695,7 @@ static void check_Tizen_configuration(GKeyFile *config)
boolean = __connman_config_get_bool(config, "General",
CONF_CONNMAN_SIMPLIFIED_LOG, &error);
if (!error)
- connman_settings.simplified_log = boolean;
+ connman_settings.simple_log = boolean;
g_clear_error(&error);
@@ -940,10 +940,11 @@ static int config_init(const char *file)
parse_config(config);
if (config)
g_key_file_free(config);
+
#if defined TIZEN_EXT
- dlog_logging = connman_settings.dlog_log;
- file_logging = connman_settings.file_log;
- simplified_log = connman_settings.simplified_log;
+ set_simple_log_option(connman_settings.simple_log);
+ set_dlog_logging_option(connman_settings.dlog_log);
+ set_file_logging_option(connman_settings.file_log);
#endif
return 0;
}
@@ -1179,7 +1180,7 @@ bool connman_setting_get_bool(const char *key)
return connman_settings.dlog_log;
if (g_str_equal(key, CONF_CONNMAN_SIMPLIFIED_LOG))
- return connman_settings.simplified_log;
+ return connman_settings.simple_log;
#endif
#if defined TIZEN_EXT
diff --git a/src/service.c b/src/service.c
index 90ff7e5e..a1e745d9 100755
--- a/src/service.c
+++ b/src/service.c
@@ -6473,6 +6473,13 @@ static bool auto_connect_service(GList *services,
if (autoconnect_no_session_active(service))
return true;
#endif
+#if defined TIZEN_EXT
+ if (service->type == CONNMAN_SERVICE_TYPE_WIFI) {
+ int index = connman_network_get_index(service->network);
+ wifi_ignore = g_slist_prepend(wifi_ignore, GINT_TO_POINTER(index));
+ autoconnecting = true;
+ }
+#endif
ignore[service->type] = true;
}
#if defined TIZEN_EXT
@@ -10014,7 +10021,7 @@ static int service_register(struct connman_service *service)
if (ret == -ERANGE)
service_ext_save(service);
ret = __connman_config_provision_service(service);
- if (ret < 0 && simplified_log)
+ if (ret < 0 && !simplified_log)
DBG("Failed to provision service");
#else
if (__connman_config_provision_service(service) < 0)