1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

* Plug a potential file descriptor leak in the wireless applet

* Add a missing dependency on gstreamerplugins, and bump PORTREVISION
This commit is contained in:
Joe Marcus Clarke 2004-06-15 05:32:53 +00:00
parent 2291f0bdd6
commit b08ef806f1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=111515
4 changed files with 26 additions and 18 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= gnomeapplets2
PORTVERSION= 2.6.1
PORTREVISION= 1
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-applets/2.6
@ -24,7 +25,8 @@ USE_X_PREFIX= yes
USE_GMAKE= yes
USE_REINPLACE= yes
GNOME_DESKTOP_VERSION=2
USE_GNOME= gnomehier gnomeprefix gnomehack intlhack lthack gnomepanel gail
USE_GNOME= gnomehier gnomeprefix gnomehack intlhack lthack gnomepanel \
gstreamerplugins gail
USE_LIBTOOL_VER=13
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"

View File

@ -1,5 +1,5 @@
--- wireless/wireless-applet.c.orig Tue Apr 13 06:39:46 2004
+++ wireless/wireless-applet.c Thu May 13 16:03:29 2004
+++ wireless/wireless-applet.c Tue Jun 15 01:22:59 2004
@@ -30,6 +30,15 @@
#include <math.h>
#include <dirent.h>
@ -72,7 +72,7 @@
wireless_applet_draw (applet, percent);
}
@@ -242,14 +267,145 @@
@@ -242,14 +267,147 @@
}
}
@ -105,6 +105,7 @@
+ GTK_WIDGET (applet),
+ "ioctl Error",
+ NULL);
+ close (s);
+ return 0;
+ }
+
@ -159,6 +160,7 @@
+ GTK_WIDGET (applet),
+ "ioctl Error",
+ NULL);
+ close (s);
+ return 0;
+ }
+
@ -220,7 +222,7 @@
gboolean found = FALSE;
/* resest list of available wireless devices */
@@ -257,8 +413,35 @@
@@ -257,8 +415,35 @@
g_list_free (applet->devices);
applet->devices = NULL;
@ -256,7 +258,7 @@
char *ptr;
fgets (line, 256, applet->file);
@@ -292,6 +475,7 @@
@@ -292,6 +477,7 @@
found = TRUE;
}
}
@ -264,7 +266,7 @@
} while (1);
if (g_list_length (applet->devices)==1) {
@@ -303,17 +487,23 @@
@@ -303,17 +489,23 @@
}
/* rewind the /proc/net/wireless file */
@ -288,7 +290,7 @@
wireless_applet_read_device_state (applet);
@@ -360,6 +550,7 @@
@@ -360,6 +552,7 @@
static void
start_file_read (WirelessApplet *applet)
{
@ -296,7 +298,7 @@
applet->file = fopen ("/proc/net/wireless", "rt");
if (applet->file == NULL) {
gtk_tooltips_set_tip (applet->tips,
@@ -368,6 +559,7 @@
@@ -368,6 +561,7 @@
NULL);
show_error_dialog (_("There doesn't seem to be any wireless devices configured on your system.\nPlease verify your configuration if you think this is incorrect."));
}
@ -304,7 +306,7 @@
}
static void
@@ -670,8 +862,10 @@
@@ -670,8 +864,10 @@
applet->prefs = NULL;
}

View File

@ -7,6 +7,7 @@
PORTNAME= gnomeapplets2
PORTVERSION= 2.6.1
PORTREVISION= 1
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-applets/2.6
@ -24,7 +25,8 @@ USE_X_PREFIX= yes
USE_GMAKE= yes
USE_REINPLACE= yes
GNOME_DESKTOP_VERSION=2
USE_GNOME= gnomehier gnomeprefix gnomehack intlhack lthack gnomepanel gail
USE_GNOME= gnomehier gnomeprefix gnomehack intlhack lthack gnomepanel \
gstreamerplugins gail
USE_LIBTOOL_VER=13
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"

View File

@ -1,5 +1,5 @@
--- wireless/wireless-applet.c.orig Tue Apr 13 06:39:46 2004
+++ wireless/wireless-applet.c Thu May 13 16:03:29 2004
+++ wireless/wireless-applet.c Tue Jun 15 01:22:59 2004
@@ -30,6 +30,15 @@
#include <math.h>
#include <dirent.h>
@ -72,7 +72,7 @@
wireless_applet_draw (applet, percent);
}
@@ -242,14 +267,145 @@
@@ -242,14 +267,147 @@
}
}
@ -105,6 +105,7 @@
+ GTK_WIDGET (applet),
+ "ioctl Error",
+ NULL);
+ close (s);
+ return 0;
+ }
+
@ -159,6 +160,7 @@
+ GTK_WIDGET (applet),
+ "ioctl Error",
+ NULL);
+ close (s);
+ return 0;
+ }
+
@ -220,7 +222,7 @@
gboolean found = FALSE;
/* resest list of available wireless devices */
@@ -257,8 +413,35 @@
@@ -257,8 +415,35 @@
g_list_free (applet->devices);
applet->devices = NULL;
@ -256,7 +258,7 @@
char *ptr;
fgets (line, 256, applet->file);
@@ -292,6 +475,7 @@
@@ -292,6 +477,7 @@
found = TRUE;
}
}
@ -264,7 +266,7 @@
} while (1);
if (g_list_length (applet->devices)==1) {
@@ -303,17 +487,23 @@
@@ -303,17 +489,23 @@
}
/* rewind the /proc/net/wireless file */
@ -288,7 +290,7 @@
wireless_applet_read_device_state (applet);
@@ -360,6 +550,7 @@
@@ -360,6 +552,7 @@
static void
start_file_read (WirelessApplet *applet)
{
@ -296,7 +298,7 @@
applet->file = fopen ("/proc/net/wireless", "rt");
if (applet->file == NULL) {
gtk_tooltips_set_tip (applet->tips,
@@ -368,6 +559,7 @@
@@ -368,6 +561,7 @@
NULL);
show_error_dialog (_("There doesn't seem to be any wireless devices configured on your system.\nPlease verify your configuration if you think this is incorrect."));
}
@ -304,7 +306,7 @@
}
static void
@@ -670,8 +862,10 @@
@@ -670,8 +864,10 @@
applet->prefs = NULL;
}