summaryrefslogtreecommitdiff
path: root/gsupplicant/supplicant.c
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2020-10-07 11:08:26 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2020-10-07 19:55:10 +0900
commit92632d79d49dd50e5a162b2cb78ca53a75d570e2 (patch)
treeb296be67afd3ef7242e95f494e41b718d5b69a36 /gsupplicant/supplicant.c
parent9395e7a086359069486e002c02b5777ca0c0df26 (diff)
downloadconnman-92632d79d49dd50e5a162b2cb78ca53a75d570e2.tar.gz
connman-92632d79d49dd50e5a162b2cb78ca53a75d570e2.tar.bz2
connman-92632d79d49dd50e5a162b2cb78ca53a75d570e2.zip
Add support for dlog
1. Add support for dlog 2. Add some log options to main.conf 3. Allow to simplify the amount of logs by option Change-Id: I8c1202ae267aca9bb2c18d44c2ccd3e6d5a74a73 Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
Diffstat (limited to 'gsupplicant/supplicant.c')
-rwxr-xr-xgsupplicant/supplicant.c63
1 files changed, 50 insertions, 13 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index c8d34e94..86100ebe 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -40,6 +40,10 @@
#include "dbus.h"
#include "gsupplicant.h"
+#if defined TIZEN_EXT
+#include "setting.h"
+#endif
+
#define IEEE80211_CAP_ESS 0x0001
#define IEEE80211_CAP_IBSS 0x0002
#define IEEE80211_CAP_PRIVACY 0x0010
@@ -456,6 +460,7 @@ struct assoc_count_data {
};
static unsigned int last_connected_bss_timeout = 0;
+static bool simplified_log = true;
#endif
static int network_remove(struct interface_data *data);
@@ -1133,7 +1138,9 @@ static void debug_strvalmap(const char *label, struct strvalmap *map,
unsigned int val)
{
int i;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
for (i = 0; map[i].str; i++) {
if (val & map[i].val)
SUPPLICANT_DBG("%s: %s", label, map[i].str);
@@ -2927,7 +2934,9 @@ static void bss_process_ies(DBusMessageIter *iter, void *user_data)
}
if(ie[0] == VENDOR_SPECIFIC_INFO && memcmp(ie+2, WPS_OUI, sizeof(WPS_OUI)) != 0) {
- SUPPLICANT_DBG("IE: match vendor specific data");
+
+ if (!simplified_log)
+ SUPPLICANT_DBG("IE: match vendor specific data");
vsie_len = ie[1]+2; // tag number size(1), tag length size(1)
vsie = (unsigned char *)g_try_malloc0(vsie_len);
@@ -3112,7 +3121,9 @@ static void bss_property(const char *key, DBusMessageIter *iter,
if (!bss->interface)
return;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("key %s", key);
if (!key)
@@ -3219,7 +3230,9 @@ static struct g_supplicant_bss *interface_bss_added(DBusMessageIter *iter,
GSupplicantNetwork *network;
struct g_supplicant_bss *bss;
const char *path = NULL;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("");
dbus_message_iter_get_basic(iter, &path);
@@ -3228,7 +3241,9 @@ static struct g_supplicant_bss *interface_bss_added(DBusMessageIter *iter,
if (g_strcmp0(path, "/") == 0)
return NULL;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("%s", path);
network = g_hash_table_lookup(interface->bss_mapping, path);
@@ -3253,7 +3268,9 @@ static void interface_bss_added_with_keys(DBusMessageIter *iter,
void *user_data)
{
struct g_supplicant_bss *bss;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("");
bss = interface_bss_added(iter, user_data);
@@ -3284,7 +3301,9 @@ static void interface_bss_added_without_keys(DBusMessageIter *iter,
void *user_data)
{
struct g_supplicant_bss *bss;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("");
bss = interface_bss_added(iter, user_data);
@@ -3517,7 +3536,9 @@ static void wps_property(const char *key, DBusMessageIter *iter,
if (!interface)
return;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("key: %s", key);
if (g_strcmp0(key, "ConfigMethods") == 0) {
@@ -3562,7 +3583,9 @@ static void interface_property(const char *key, DBusMessageIter *iter,
if (!interface)
return;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("%s", key);
if (!key) {
@@ -3987,7 +4010,9 @@ static void signal_interface_removed(const char *path, DBusMessageIter *iter)
static void signal_interface_changed(const char *path, DBusMessageIter *iter)
{
GSupplicantInterface *interface;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("");
interface = g_hash_table_lookup(interface_table, path);
@@ -4037,7 +4062,9 @@ static void signal_scan_done(const char *path, DBusMessageIter *iter)
static void signal_bss_added(const char *path, DBusMessageIter *iter)
{
GSupplicantInterface *interface;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("");
interface = g_hash_table_lookup(interface_table, path);
@@ -4171,6 +4198,9 @@ static void signal_bss_changed(const char *path, DBusMessageIter *iter)
unsigned int old_wps_capabilities;
struct g_supplicant_bss *bss;
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("");
interface = g_hash_table_lookup(bss_mapping, path);
@@ -5707,6 +5737,9 @@ static void interface_get_result(const char *error,
const char *path = NULL;
int err;
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("");
if (error) {
@@ -5777,7 +5810,9 @@ done:
static void interface_get_params(DBusMessageIter *iter, void *user_data)
{
struct interface_create_data *data = user_data;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
SUPPLICANT_DBG("");
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &data->ifname);
@@ -8478,7 +8513,9 @@ int g_supplicant_register(const GSupplicantCallbacks *callbacks)
connection = NULL;
return -EIO;
}
-
+#if defined TIZEN_EXT
+ simplified_log = connman_setting_get_bool("SimplifiedLog");
+#endif
callbacks_pointer = callbacks;
eap_methods = 0;