Mercurial > noffle
comparison src/server.c @ 241:d70e9dd6b308 noffle
[svn] see Changelog Mar 13 2002
| author | mirkol |
|---|---|
| date | Wed, 13 Mar 2002 11:12:23 +0000 |
| parents | f8a91e2b4060 |
| children | b660fadc1814 |
comparison
equal
deleted
inserted
replaced
| 240:fbff73fe5b40 | 241:d70e9dd6b308 |
|---|---|
| 1 /* | 1 /* |
| 2 server.c | 2 server.c |
| 3 | 3 |
| 4 $Id: server.c 368 2002-02-14 17:14:34Z bears $ | 4 $Id: server.c 372 2002-03-13 11:12:23Z mirkol $ |
| 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 |
| 519 touchArticle( s ); | 519 touchArticle( s ); |
| 520 } | 520 } |
| 521 } | 521 } |
| 522 | 522 |
| 523 static void | 523 static void |
| 524 doBodyInDb( const char *msgId ) | 524 updateArt( const char *msgId ) |
| 525 /* retrieve Article if in online mode */ | |
| 525 { | 526 { |
| 526 int stat; | 527 int stat; |
| 527 Str srv; | |
| 528 | 528 |
| 529 touchArticle( msgId ); | 529 touchArticle( msgId ); |
| 530 touchReferences( msgId ); | 530 touchReferences( msgId ); |
| 531 stat = Db_status( msgId ); | 531 stat = Db_status( msgId ); |
| 532 if ( Online_true() && ( stat & DB_NOT_DOWNLOADED ) ) | 532 if ( Online_true() && ( stat & DB_NOT_DOWNLOADED ) ) |
| 533 { | 533 { |
| 534 retrieveArt( msgId ); | 534 retrieveArt( msgId ); |
| 535 stat = Db_status( msgId ); | 535 } |
| 536 } | 536 } |
| 537 | |
| 538 static void | |
| 539 doBodyInDb( const char *msgId ) | |
| 540 { | |
| 541 int stat; | |
| 542 Str srv; | |
| 543 | |
| 544 stat = Db_status( msgId ); | |
| 537 if ( stat & DB_RETRIEVING_FAILED ) | 545 if ( stat & DB_RETRIEVING_FAILED ) |
| 538 { | 546 { |
| 539 Db_setStatus( msgId, stat & ~DB_RETRIEVING_FAILED ); | 547 Db_setStatus( msgId, stat & ~DB_RETRIEVING_FAILED ); |
| 540 putTxtBuf( Db_body( msgId ) ); | 548 putTxtBuf( Db_body( msgId ) ); |
| 541 } | 549 } |
| 566 if ( ! whichId( &msgId, &numb, arg ) ) | 574 if ( ! whichId( &msgId, &numb, arg ) ) |
| 567 return TRUE; | 575 return TRUE; |
| 568 putStat( STAT_BODY_FOLLOWS, "%ld %s Body", numb, msgId ); | 576 putStat( STAT_BODY_FOLLOWS, "%ld %s Body", numb, msgId ); |
| 569 if ( Pseudo_isGeneralInfo( msgId ) ) | 577 if ( Pseudo_isGeneralInfo( msgId ) ) |
| 570 putTxtBuf( Pseudo_generalInfoBody() ); | 578 putTxtBuf( Pseudo_generalInfoBody() ); |
| 571 else | 579 else |
| 580 { | |
| 581 updateArt( msgId ); | |
| 572 doBodyInDb( msgId ); | 582 doBodyInDb( msgId ); |
| 583 } | |
| 573 putEndOfTxt(); | 584 putEndOfTxt(); |
| 574 noteInterest(); | 585 noteInterest(); |
| 575 return TRUE; | 586 return TRUE; |
| 576 } | 587 } |
| 577 | 588 |
| 601 } | 612 } |
| 602 | 613 |
| 603 static void | 614 static void |
| 604 doArtInDb( const char *msgId ) | 615 doArtInDb( const char *msgId ) |
| 605 { | 616 { |
| 617 updateArt( msgId ); | |
| 606 doHeadInDb( msgId ); | 618 doHeadInDb( msgId ); |
| 607 putTxtLn( "" ); | 619 putTxtLn( "" ); |
| 608 doBodyInDb( msgId ); | 620 doBodyInDb( msgId ); |
| 609 } | 621 } |
| 610 | 622 |
