Mercurial > noffle
comparison src/client.c @ 191:28488e0e3630 noffle
[svn] * src/group.h,src/group.c,src/noffle.c,src/server.c: Grp_setLastAccess is
only ever called with last param as time(NULL), so remove it and call
time() inside the implementation of Grp_setLastAccess.
* src/client.c,src/group.h,src/group.c,src/noffle.c,src/post.c: Groups are
automatically unsubscribed when the last access to the group is older
than a particular threshold. However, for very low traffic groups, the
last access may exceed the threshold simply because there has been no new
article posted. In this case, rather than unsubscribe, update the group
last access time. This means that groups are now only unsubscribed if
the last access exceeds the threshold AND articles have arrived in the
group since. Add Grp_setLastPostTime() to track the last time an article
arrived in the group.
author | bears |
---|---|
date | Sat, 20 Oct 2001 14:23:46 +0100 |
parents | f1bacee93ca6 |
children | 24d4cd032da5 |
comparison
equal
deleted
inserted
replaced
190:47569cf4ad4a | 191:28488e0e3630 |
---|---|
1 /* | 1 /* |
2 client.c | 2 client.c |
3 | 3 |
4 $Id: client.c 307 2001-09-12 20:33:44Z bears $ | 4 $Id: client.c 310 2001-10-20 13:23:46Z bears $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
1027 } | 1027 } |
1028 } | 1028 } |
1029 Grp_setRmtNext( client.grp, rmtNumb + 1 ); | 1029 Grp_setRmtNext( client.grp, rmtNumb + 1 ); |
1030 } | 1030 } |
1031 if ( oldLast != Cont_last() ) | 1031 if ( oldLast != Cont_last() ) |
1032 { | |
1032 Log_inf( "Added %s %lu-%lu", client.grp, oldLast + 1, Cont_last() ); | 1033 Log_inf( "Added %s %lu-%lu", client.grp, oldLast + 1, Cont_last() ); |
1033 Log_inf( "%u articles marked for download in %s", cntMarked, client.grp ); | 1034 Log_inf( "%u articles marked for download in %s", |
1034 Cont_write(); | 1035 cntMarked, client.grp ); |
1035 Grp_setFirstLast( grp, Cont_first(), Cont_last() ); | 1036 Cont_write(); |
1037 Grp_setFirstLast( grp, Cont_first(), Cont_last() ); | |
1038 Grp_setLastPostTime( grp ); | |
1039 } | |
1036 Lock_closeDatabases(); | 1040 Lock_closeDatabases(); |
1037 del_DynStr( response ); | 1041 del_DynStr( response ); |
1038 del_DynStr( newsgroups ); | 1042 del_DynStr( newsgroups ); |
1039 return STAT_OK; | 1043 return STAT_OK; |
1040 } | 1044 } |