about summary refs log tree commit diff
path: root/src/settings/plugins/ifnet/wpa_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings/plugins/ifnet/wpa_parser.c')
-rw-r--r--src/settings/plugins/ifnet/wpa_parser.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/settings/plugins/ifnet/wpa_parser.c b/src/settings/plugins/ifnet/wpa_parser.c
index e517bf12..748eb351 100644
--- a/src/settings/plugins/ifnet/wpa_parser.c
+++ b/src/settings/plugins/ifnet/wpa_parser.c
@@ -22,6 +22,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <nm-system-config-interface.h>
+#include <nm-logging.h>
 #include "wpa_parser.h"
 #include "net_parser.h"
 #include "net_utils.h"
@@ -236,8 +237,7 @@ add_global_data (gchar * line)
 	g_strstrip (line);
 	key_value = g_strsplit (line, "=", 2);
 	if (g_strv_length (key_value) != 2) {
-		PLUGIN_WARN (IFNET_PLUGIN_NAME, "Can't handle this line: %s\n",
-			     line);
+		nm_log_warn (LOGD_SETTINGS, "Can't handle this line: %s\n", line);
 		g_strfreev (key_value);
 		return;
 	}
@@ -262,9 +262,8 @@ wpa_parser_init (const char *wpa_supplicant_conf)
 		channel =
 		    g_io_channel_new_file (wpa_supplicant_conf, "r", NULL);
 	if (channel == NULL) {
-		PLUGIN_WARN (IFNET_PLUGIN_NAME,
-			     "Can't open %s for wireless security",
-			     wpa_supplicant_conf);
+		nm_log_warn (LOGD_SETTINGS, "Can't open %s for wireless security",
+		             wpa_supplicant_conf);
 		return;
 	}
 
@@ -380,12 +379,11 @@ wpa_flush_to_file (const char *config_file)
 
 	channel = g_io_channel_new_file (config_file, "w", NULL);
 	if (!channel) {
-		PLUGIN_WARN (IFNET_PLUGIN_NAME,
-			     "Can't open file %s for writing", config_file);
+		nm_log_warn (LOGD_SETTINGS, "Can't open file %s for writing", config_file);
 		return FALSE;
 	}
 	g_hash_table_iter_init (&iter, wsec_global_table);
-	PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Writing to %s", config_file);
+	nm_log_info (LOGD_SETTINGS, "Writing to %s", config_file);
 	g_io_channel_write_chars (channel,
 				  "#Generated by NetworkManager\n"
 				  "###### Global Configuration ######\n",
@@ -402,8 +400,7 @@ wpa_flush_to_file (const char *config_file)
 		g_free (out_line);
 	}
 	if (error && *error) {
-		PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s",
-			     (*error)->message);
+		nm_log_warn (LOGD_SETTINGS, "Found error: %s", (*error)->message);
 		goto done;
 	}
 	g_io_channel_write_chars (channel,
@@ -433,15 +430,13 @@ wpa_flush_to_file (const char *config_file)
 
 	}
 	if (error && *error) {
-		PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s",
-			     (*error)->message);
+		nm_log_warn (LOGD_SETTINGS, "Found error: %s", (*error)->message);
 		goto done;
 	}
 	g_io_channel_flush (channel, error);
 
 	if (error && *error) {
-		PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s",
-			     (*error)->message);
+		nm_log_warn (LOGD_SETTINGS, "Found error: %s", (*error)->message);
 		goto done;
 	}
 	wpa_parser_data_changed = FALSE;
@@ -504,8 +499,7 @@ wpa_add_security (const char *ssid)
 		    g_hash_table_new (g_str_hash, g_str_equal);
 		gchar *ssid_i;
 
-		PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Adding security for %s",
-			      ssid);
+		nm_log_info (LOGD_SETTINGS, "Adding security for %s", ssid);
 		if (g_str_has_prefix (ssid, "0x")) {
 			/* hex ssid */
 			ssid_i = g_strdup (ssid + 2);
@@ -528,7 +522,7 @@ wpa_delete_security (const char *ssid)
 	gpointer old_key, old_value;
 
 	g_return_val_if_fail (wsec_table != NULL && ssid != NULL, FALSE);
-	PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Deleting security for %s", ssid);
+	nm_log_info (LOGD_SETTINGS, "Deleting security for %s", ssid);
 	if (!g_hash_table_lookup_extended
 	    (wsec_table, ssid, &old_key, &old_value))
 		return FALSE;