packages: idled/idled.spec, idled/idled-malloc.patch (NEW) - rel 11 - use d...
baggins
baggins at pld-linux.org
Fri Dec 18 00:38:29 CET 2009
Author: baggins Date: Thu Dec 17 23:38:28 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 11
- use dynamically allocated memory, MAXUSERS=10000 seems too much for data seg
---- Files affected:
packages/idled:
idled.spec (1.29 -> 1.30) , idled-malloc.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/idled/idled.spec
diff -u packages/idled/idled.spec:1.29 packages/idled/idled.spec:1.30
--- packages/idled/idled.spec:1.29 Fri Dec 18 00:24:58 2009
+++ packages/idled/idled.spec Fri Dec 18 00:38:23 2009
@@ -3,7 +3,7 @@
Summary(pl.UTF-8): Demon który kończy nieaktywne sesje użytkowników
Name: idled
Version: 1.16
-Release: 10
+Release: 11
License: non-profit
Group: Daemons
Source0: http://www.darkwing.com/idled/download/%{name}-%{version}.tar.gz
@@ -15,6 +15,7 @@
Patch3: %{name}-utmp.patch
Patch4: %{name}-yacc.patch
Patch5: %{name}-O_NONBLOCK.patch
+Patch6: %{name}-malloc.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: rpmbuild(macros) >= 1.268
@@ -42,6 +43,7 @@
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
%build
%{__make} clean
@@ -101,6 +103,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.30 2009/12/17 23:38:23 baggins
+- rel 11
+- use dynamically allocated memory, MAXUSERS=10000 seems too much for data seg
+
Revision 1.29 2009/12/17 23:24:58 baggins
- rel 10
- MAXUSERS up to 10000
================================================================
Index: packages/idled/idled-malloc.patch
diff -u /dev/null packages/idled/idled-malloc.patch:1.1
--- /dev/null Fri Dec 18 00:38:29 2009
+++ packages/idled/idled-malloc.patch Fri Dec 18 00:38:23 2009
@@ -0,0 +1,42 @@
+diff -u idled-1.16/idled.c idled-1.16-malloc/idled.c
+--- idled-1.16/idled.c 2009-12-18 00:35:26.999921232 +0100
++++ idled-1.16-malloc/idled.c 2009-12-18 00:34:49.166672755 +0100
+@@ -54,8 +54,8 @@
+ struct usertime *next; /* Pointer to the next entry */
+ };
+
+-struct user users[MAXUSERS];
+-struct user *pusers[MAXUSERS];
++struct user *users;
++struct user **pusers;
+ struct usertime *sess_users = NULL;
+ struct linetime *errorlines = NULL;
+
+@@ -241,6 +241,13 @@
+ rules = (struct qelem *) malloc (sizeof (struct qelem));
+ session = (struct qelem *) malloc (sizeof (struct qelem));
+
++ users = (struct user *)malloc(MAXUSERS * sizeof(struct user));
++ pusers = (struct user **)malloc(MAXUSERS * sizeof(struct user *));
++ if (users == NULL || pusers == NULL) {
++ (void) fprintf (stderr, "idled: Cannot allocate memory for user tables\n");
++ exit (1);
++ }
++
+ exmpt->q_forw = exmpt->q_back = exmpt;
+ refuse->q_forw = refuse->q_back = refuse;
+ rules->q_forw = rules->q_back = rules;
+diff -u idled-1.16/idled.h idled-1.16-malloc/idled.h
+--- idled-1.16/idled.h 2009-12-18 00:35:26.996921911 +0100
++++ idled-1.16-malloc/idled.h 2009-12-18 00:34:16.581920419 +0100
+@@ -156,8 +156,8 @@
+ ** just skip him.
+ */
+
+-extern struct user users[];
+-extern struct user *pusers[];
++extern struct user *users;
++extern struct user **pusers;
+
+ /* records that the nodes of the linked list will have pointers too */
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/idled/idled.spec?r1=1.29&r2=1.30&f=u
More information about the pld-cvs-commit
mailing list