Mercurial > noffle
comparison src/server.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 server.c | 2 server.c |
3 | 3 |
4 $Id: server.c 307 2001-09-12 20:33:44Z bears $ | 4 $Id: server.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 |
126 static void | 126 static void |
127 noteInterest( void ) | 127 noteInterest( void ) |
128 { | 128 { |
129 FetchMode mode; | 129 FetchMode mode; |
130 | 130 |
131 Grp_setLastAccess( server.grp, time( NULL ) ); | 131 Grp_setLastAccess( server.grp ); |
132 if ( ! Grp_local ( server.grp ) && ! Online_true() ) | 132 if ( ! Grp_local ( server.grp ) && ! Online_true() ) |
133 { | 133 { |
134 Fetchlist_read(); | 134 Fetchlist_read(); |
135 if ( ! Fetchlist_contains( server.grp ) ) | 135 if ( ! Fetchlist_contains( server.grp ) ) |
136 { | 136 { |
1334 putTxtLn( "%lu\t%s\t%s\t%s\t%s\t%s\t%d\t%d\t", | 1334 putTxtLn( "%lu\t%s\t%s\t%s\t%s\t%s\t%d\t%d\t", |
1335 Ov_numb( ov ), Ov_subj( ov ), Ov_from( ov ), | 1335 Ov_numb( ov ), Ov_subj( ov ), Ov_from( ov ), |
1336 Ov_date( ov ), Ov_msgId( ov ), Ov_ref( ov ), | 1336 Ov_date( ov ), Ov_msgId( ov ), Ov_ref( ov ), |
1337 Ov_bytes( ov ), Ov_lines( ov ) ); | 1337 Ov_bytes( ov ), Ov_lines( ov ) ); |
1338 putEndOfTxt(); | 1338 putEndOfTxt(); |
1339 Grp_setLastAccess( server.grp, time( NULL ) ); | 1339 Grp_setLastAccess( server.grp ); |
1340 return TRUE; | 1340 return TRUE; |
1341 } | 1341 } |
1342 | 1342 |
1343 static void | 1343 static void |
1344 putFatal( const char *fmt, ... ) | 1344 putFatal( const char *fmt, ... ) |