Mercurial > noffle
changeset 386:278a03a392b1 noffle
[svn] * src/client.c: Return correct status from Client_postArt() and add
function comment detailing what return code should be, because it's
not obvious that the return code should report success when the
posting failed for reasons other than connection problems. This should fix
problem with failing posting stopping fetches. Thanks to Dan Jacobson
for spotting this.
* src/client.c: Fix problemette with filter discards not updating remote
group article count and so the overview being refetched until
and article appears that doesn't fall foul of the filter and thus does
update the remove group 'next article' marker. Thanks to Dan Jacobson
for spotting this.
author | bears |
---|---|
date | Thu, 22 May 2003 09:23:33 +0100 |
parents | e3756d005fa4 |
children | 0137b5490cca |
files | src/client.c |
diffstat | 1 files changed, 23 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/client.c Thu May 15 19:08:44 2003 +0100 +++ b/src/client.c Thu May 22 09:23:33 2003 +0100 @@ -1,7 +1,7 @@ /* client.c - $Id: client.c 466 2003-02-26 11:30:41Z bears $ + $Id: client.c 528 2003-05-22 08:23:33Z bears $ */ #if HAVE_CONFIG_H @@ -986,16 +986,18 @@ if ( action == FILTER_DISCARD ) { del_Over( ov ); - continue; } - Cont_app( ov ); /* Cont modules owns ov after this */ - prepareEntry( ov ); - if ( action == FILTER_FULL - || ( action == FILTER_THREAD && needsMark( ref ) ) ) - { - Req_add( client.serv, msgId ); - ++cntMarked; - } + else + { + Cont_app( ov ); /* Cont modules owns ov after this */ + prepareEntry( ov ); + if ( action == FILTER_FULL + || ( action == FILTER_THREAD && needsMark( ref ) ) ) + { + Req_add( client.serv, msgId ); + ++cntMarked; + } + } } Grp_setRmtNext( client.grp, rmtNumb + 1 ); } @@ -1213,6 +1215,15 @@ *last = client.rmtLast; } +/** + * Post an article. + * + * Return status if there's a connection problem. Otherwise return + * STAT_OK. If there's an error in posting, put the error into + * errStr, and return STAT_OK. That is, the return value indicates if + * a proper transaction happened, and errStr indicates if that + * transaction contained a posting error. + */ int Client_postArt( const char *msgId, const char *artTxt, Str errStr ) { @@ -1229,7 +1240,7 @@ { Log_err( "Posting of %s not allowed: %s", msgId, client.lastStat ); Utl_cpyStr( errStr, client.lastStat ); - return stat; + return STAT_OK; } putTxtBuf( artTxt ); putEndOfTxt(); @@ -1240,7 +1251,7 @@ { Log_err( "Posting of %s failed: %s", msgId, client.lastStat ); Utl_cpyStr( errStr, client.lastStat ); - return stat; + return STAT_OK; } Log_inf( "Posted %s (Status: %s)", msgId, client.lastStat ); return STAT_OK;