NetworkManager r3531 - trunk/libnm-util



Author: dcbw
Date: Fri Apr  4 20:56:35 2008
New Revision: 3531
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3531&view=rev

Log:
Don't allow empty service value

Modified:
   trunk/libnm-util/nm-setting-pppoe.c

Modified: trunk/libnm-util/nm-setting-pppoe.c
==============================================================================
--- trunk/libnm-util/nm-setting-pppoe.c	(original)
+++ trunk/libnm-util/nm-setting-pppoe.c	Fri Apr  4 20:56:35 2008
@@ -24,8 +24,13 @@
 {
 	NMSettingPPPOE *self = NM_SETTING_PPPOE (setting);
 
-	if (!self->username) {
-		g_warning ("Missing username");
+	if (!self->username || !strlen (self->username)) {
+		g_warning ("Missing or empty username");
+		return FALSE;
+	}
+
+	if (self->service && !strlen (self->service)) {
+		g_warning ("Empty service");
 		return FALSE;
 	}
 



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