gdm r6332 - in branches/gnome-2-20: . gui



Author: bcameron
Date: Mon Jul 28 08:20:29 2008
New Revision: 6332
URL: http://svn.gnome.org/viewvc/gdm?rev=6332&view=rev

Log:
2008-07-28 Brian Cameron <brian cameron sun com>

        * gui/gdmchooser.c:  Ignore ENXIO when processing ioctl since
          some distros (FreeBSD) yields ENXIO for non-IP/non-configured
          interfaces.  Fixes bug #544790.  Patch by Volker Stolz
          (vs+gnome FreeBSD org).


Modified:
   branches/gnome-2-20/ChangeLog
   branches/gnome-2-20/gui/gdmchooser.c

Modified: branches/gnome-2-20/gui/gdmchooser.c
==============================================================================
--- branches/gnome-2-20/gui/gdmchooser.c	(original)
+++ branches/gnome-2-20/gui/gdmchooser.c	Mon Jul 28 08:20:29 2008
@@ -727,7 +727,12 @@
 			/* paranoia */
 			ifreq.ifr_name[sizeof (ifreq.ifr_name) - 1] = '\0';
 
-			if (ioctl (sock, SIOCGIFFLAGS, &ifreq) < 0) 
+			/*
+			 * Ignore ENXIO silently, since some distros (FreeBSD)
+			 * yields ENXIO for non-IP/non-configured interfaces.
+			 *  Fixes bug #544790.
+			 */
+			if ((ioctl (sock, SIOCGIFFLAGS, &ifreq) < 0) && (errno != ENXIO))
 				gdm_common_error ("Could not get SIOCGIFFLAGS for %s", ifr[i].ifr_name);
 
 			if ((ifreq.ifr_flags & IFF_UP) == 0 ||



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