patch to update group_change_time

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

 



Sometimes group_change_time is not updated which could lead to the loss of
news that I reported earlier.  Here's a patch that attempts to fix this.
-- 
Debian GNU/Linux 1.3 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
Index: group.c
===================================================================
RCS file: /home/greathan/herbert/src/CVS/debian/nntpcache/src/group.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- group.c	1998/01/31 09:31:55	1.1.1.1
+++ group.c	1998/05/02 10:03:59	1.2
@@ -153,9 +153,8 @@
 		n->msgs = cnt;
 		f_changed = TRUE;
 	}
-	n->group_time = time(NULL);
 	if (f_changed)
-		n->group_change_time = n->group_time;
+		n->group_change_time = time(NULL);
 }
 
 /*
@@ -187,6 +186,7 @@
 	{
 		if (newsgroupLockWrite(n))
 		{
+			n->group_time = time(NULL);
 			setGroup(n, msgs, lo, hi);
 			n->write_locks = 0;
 		}
Index: list.c
===================================================================
RCS file: /home/greathan/herbert/src/CVS/debian/nntpcache/src/list.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- list.c	1998/01/30 22:20:26	1.1.1.1
+++ list.c	1998/05/02 10:04:00	1.2
@@ -248,6 +248,7 @@
 	bool f_new_node;
 	char *p;
 	char *group;
+	int hi, lo;
 
 	strStripEOL(buf);
 	for (p = buf; *p && !isspace (*p); p++) ;
@@ -314,7 +315,8 @@
 	switch (list->type)
 	{
 	case l_active:
-		sscanf (p, "%d %d %c", &n->hi_server, &n->lo_server, &n->moderation);
+		sscanf (p, "%d %d %c", &hi, &lo, &n->moderation);
+		setGroup (n, n->msgs, lo, hi);
 		break;
 	case l_active_times:
 	        if (!n->moderation)	/* no/bad active information */


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux