[network-manager-vpnc] core: replace nm_warning/nm_info usage with g_warning/g_message



commit ba02e5b91172482bb00bcfa32b9f85d0418d3ace
Author: Dan Williams <dcbw redhat com>
Date:   Fri Mar 4 22:47:58 2011 -0600

    core: replace nm_warning/nm_info usage with g_warning/g_message

 src/nm-vpnc-service-vpnc-helper.c |   16 ++++++++--------
 src/nm-vpnc-service.c             |   17 ++++++++---------
 2 files changed, 16 insertions(+), 17 deletions(-)
---
diff --git a/src/nm-vpnc-service-vpnc-helper.c b/src/nm-vpnc-service-vpnc-helper.c
index 1b67811..a3f9aa2 100644
--- a/src/nm-vpnc-service-vpnc-helper.c
+++ b/src/nm-vpnc-service-vpnc-helper.c
@@ -46,7 +46,7 @@ helper_failed (DBusGConnection *connection, const char *reason)
 	DBusGProxy *proxy;
 	GError *err = NULL;
 
-	nm_warning ("nm-nvpnc-service-vpnc-helper did not receive a valid %s from vpnc", reason);
+	g_warning ("nm-nvpnc-service-vpnc-helper did not receive a valid %s from vpnc", reason);
 
 	proxy = dbus_g_proxy_new_for_name (connection,
 								NM_DBUS_SERVICE_VPNC,
@@ -59,7 +59,7 @@ helper_failed (DBusGConnection *connection, const char *reason)
 				    G_TYPE_INVALID);
 
 	if (err) {
-		nm_warning ("Could not send failure information: %s", err->message);
+		g_warning ("Could not send failure information: %s", err->message);
 		g_error_free (err);
 	}
 
@@ -86,7 +86,7 @@ send_ip4_config (DBusGConnection *connection, GHashTable *config)
 				    G_TYPE_INVALID);
 
 	if (err) {
-		nm_warning ("Could not send IPv4 configuration: %s", err->message);
+		g_warning ("Could not send IPv4 configuration: %s", err->message);
 		g_error_free (err);
 	}
 
@@ -217,7 +217,7 @@ get_routes (void)
 		snprintf (buf, BUFLEN, "CISCO_SPLIT_INC_%d_ADDR", i);
 		tmp = getenv (buf);
 		if (!tmp || inet_pton (AF_INET, tmp, &network) <= 0) {
-			nm_warning ("Ignoring invalid static route address '%s'", tmp ? tmp : "NULL");
+			g_warning ("Ignoring invalid static route address '%s'", tmp ? tmp : "NULL");
 			continue;
 		}
 
@@ -229,7 +229,7 @@ get_routes (void)
 			errno = 0;
 			tmp_prefix = strtol (tmp, NULL, 10);
 			if (errno || tmp_prefix <= 0 || tmp_prefix > 32) {
-				nm_warning ("Ignoring invalid static route prefix '%s'", tmp ? tmp : "NULL");
+				g_warning ("Ignoring invalid static route prefix '%s'", tmp ? tmp : "NULL");
 				continue;
 			}
 			prefix = (guint32) tmp_prefix;
@@ -239,7 +239,7 @@ get_routes (void)
 			snprintf (buf, BUFLEN, "CISCO_SPLIT_INC_%d_MASK", i);
 			tmp = getenv (buf);
 			if (!tmp || inet_pton (AF_INET, tmp, &netmask) <= 0) {
-				nm_warning ("Ignoring invalid static route netmask '%s'", tmp ? tmp : "NULL");
+				g_warning ("Ignoring invalid static route netmask '%s'", tmp ? tmp : "NULL");
 				continue;
 			}
 			prefix = nm_utils_ip4_netmask_to_prefix (netmask.s_addr);
@@ -298,7 +298,7 @@ main (int argc, char *argv[])
 
 	connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err);
 	if (!connection) {
-		nm_warning ("Could not get the system bus: %s", err->message);
+		g_warning ("Could not get the system bus: %s", err->message);
 		exit (1);
 	}
 
@@ -375,7 +375,7 @@ main (int argc, char *argv[])
 		errno = 0;
 		mtu = strtol (tmp, NULL, 10);
 		if (errno || mtu < 0 || mtu > 20000) {
-			nm_warning ("Ignoring invalid tunnel MTU '%s'", tmp);
+			g_warning ("Ignoring invalid tunnel MTU '%s'", tmp);
 			mtu = 1412;
 		}
 	}
diff --git a/src/nm-vpnc-service.c b/src/nm-vpnc-service.c
index 8cc0e15..74dcab2 100644
--- a/src/nm-vpnc-service.c
+++ b/src/nm-vpnc-service.c
@@ -223,14 +223,14 @@ vpnc_watch_cb (GPid pid, gint status, gpointer user_data)
 	if (WIFEXITED (status)) {
 		error = WEXITSTATUS (status);
 		if (error != 0)
-			nm_warning ("vpnc exited with error code %d", error);
+			g_warning ("vpnc exited with error code %d", error);
 	}
 	else if (WIFSTOPPED (status))
-		nm_warning ("vpnc stopped unexpectedly with signal %d", WSTOPSIG (status));
+		g_warning ("vpnc stopped unexpectedly with signal %d", WSTOPSIG (status));
 	else if (WIFSIGNALED (status))
-		nm_warning ("vpnc died with signal %d", WTERMSIG (status));
+		g_warning ("vpnc died with signal %d", WTERMSIG (status));
 	else
-		nm_warning ("vpnc died from an unknown cause");
+		g_warning ("vpnc died from an unknown cause");
 
 	/* Reap child if needed. */
 	waitpid (priv->pid, NULL, WNOHANG);
@@ -290,12 +290,12 @@ nm_vpnc_start_vpnc_binary (NMVPNCPlugin *plugin, GError **error)
 							 G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, &stdin_fd,
 							 NULL, NULL, error)) {
 		g_ptr_array_free (vpnc_argv, TRUE);
-		nm_warning ("vpnc failed to start.  error: '%s'", (*error)->message);
+		g_warning ("vpnc failed to start.  error: '%s'", (*error)->message);
 		return -1;
 	}
 	g_ptr_array_free (vpnc_argv, TRUE);
 
-	nm_info ("vpnc started with pid %d", pid);
+	g_message ("vpnc started with pid %d", pid);
 
 	NM_VPNC_PLUGIN_GET_PRIVATE (plugin)->pid = pid;
 	vpnc_watch = g_child_watch_source_new (pid);
@@ -406,8 +406,7 @@ write_one_property (const char *key, const char *value, gpointer user_data)
 		/* ignored */
 	} else {
 		/* Just ignore unknown properties */
-		nm_warning ("Don't know how to write property '%s' with type %s",
-				  (char *) key, g_type_name (type));
+		g_warning ("Don't know how to write property '%s' with type %s", key, g_type_name (type));
 	}
 }
 
@@ -623,7 +622,7 @@ real_disconnect (NMVPNPlugin   *plugin,
 		else
 			kill (priv->pid, SIGKILL);
 
-		nm_info ("Terminated vpnc daemon with PID %d.", priv->pid);
+		g_message ("Terminated vpnc daemon with PID %d.", priv->pid);
 		priv->pid = 0;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]