changeset 241:d70e9dd6b308 noffle

[svn] see Changelog Mar 13 2002
author mirkol
date Wed, 13 Mar 2002 11:12:23 +0000
parents fbff73fe5b40
children aa9e65f63755
files src/server.c
diffstat 1 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/server.c	Tue Feb 26 17:13:31 2002 +0000
+++ b/src/server.c	Wed Mar 13 11:12:23 2002 +0000
@@ -1,7 +1,7 @@
 /*
   server.c
 
-  $Id: server.c 368 2002-02-14 17:14:34Z bears $
+  $Id: server.c 372 2002-03-13 11:12:23Z mirkol $
 */
 
 #if HAVE_CONFIG_H
@@ -521,10 +521,10 @@
 }
 
 static void
-doBodyInDb( const char *msgId )
+updateArt( const char *msgId )
+/* retrieve Article if in online mode */
 {
     int stat;
-    Str srv;
 
     touchArticle( msgId );
     touchReferences( msgId );
@@ -532,8 +532,16 @@
     if ( Online_true() && ( stat & DB_NOT_DOWNLOADED ) )
     {
         retrieveArt( msgId );
-        stat = Db_status( msgId );
     }
+}
+
+static void
+doBodyInDb( const char *msgId )
+{
+    int stat;
+    Str srv;
+
+    stat = Db_status( msgId );
     if ( stat & DB_RETRIEVING_FAILED )
     {
         Db_setStatus( msgId, stat & ~DB_RETRIEVING_FAILED );
@@ -568,8 +576,11 @@
     putStat( STAT_BODY_FOLLOWS, "%ld %s Body", numb, msgId );
     if ( Pseudo_isGeneralInfo( msgId ) )
         putTxtBuf( Pseudo_generalInfoBody() );
-    else
+    else 
+    {
+        updateArt( msgId ); 
         doBodyInDb( msgId );
+    }
     putEndOfTxt();
     noteInterest();
     return TRUE;
@@ -603,6 +614,7 @@
 static void
 doArtInDb( const char *msgId )
 {
+    updateArt( msgId ); 
     doHeadInDb( msgId );
     putTxtLn( "" );
     doBodyInDb( msgId );