comparison src/pseudo.c @ 223:ffb1848a39db noffle

[svn] * src/util.c: Improve (correct) error detection when updating timestamp file. * src/content.h, src/content.c: Return Boolean success/fail from Cont_write. Also ensure cont.first isn't polluted in the event of a failed update. * src/client.c,src/control.c,src/fetch.c,src/noffle.c,src/post.c, src/pseudo.c: If Cont_write fails, don't do actions that need it to have worked. Typically, don't update first and last article numbers in group database. * src/server.c: If groupinfo.lastupdate is unreadable or corrupt, spot this and report it and give an explicit error when processing NNTP NEWGROUPS command.
author bears
date Sun, 09 Dec 2001 12:31:57 +0000
parents 24d4cd032da5
children fbff73fe5b40
comparison
equal deleted inserted replaced
222:bf290632d29e 223:ffb1848a39db
1 /* 1 /*
2 pseudo.c 2 pseudo.c
3 3
4 $Id: pseudo.c 316 2001-10-31 11:44:53Z bears $ 4 $Id: pseudo.c 342 2001-12-09 12:31:57Z 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
204 if ( body && artTxt && ov ) 204 if ( body && artTxt && ov )
205 { 205 {
206 Cont_app( ov ); 206 Cont_app( ov );
207 if ( Db_prepareEntry( ov, Cont_grp(), Cont_last() ) ) 207 if ( Db_prepareEntry( ov, Cont_grp(), Cont_last() ) )
208 Db_storeArt( Ov_msgId( ov ), DynStr_str( artTxt ) ); 208 Db_storeArt( Ov_msgId( ov ), DynStr_str( artTxt ) );
209 Cont_write(); 209 if ( Cont_write() )
210 Grp_setFirstLast( Cont_grp(), Cont_first(), Cont_last() ); 210 Grp_setFirstLast( Cont_grp(), Cont_first(), Cont_last() );
211 } 211 }
212 del_DynStr( body ); 212 del_DynStr( body );
213 del_DynStr( artTxt ); 213 del_DynStr( artTxt );
214 } 214 }
215 215