Mercurial > noffle
comparison src/client.c @ 95:c3312022e657 noffle
[svn] Observe Supersedes: header
author | bears |
---|---|
date | Fri, 19 May 2000 16:16:50 +0100 |
parents | 1fcdced0246e |
children | 38b0a1532a37 |
comparison
equal
deleted
inserted
replaced
94:be450ac830b2 | 95:c3312022e657 |
---|---|
1 /* | 1 /* |
2 client.c | 2 client.c |
3 | 3 |
4 $Id: client.c 100 2000-05-18 12:17:23Z bears $ | 4 $Id: client.c 114 2000-05-19 15:16:50Z 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 |
19 #include <stdarg.h> | 19 #include <stdarg.h> |
20 #include <sys/socket.h> | 20 #include <sys/socket.h> |
21 #include <unistd.h> | 21 #include <unistd.h> |
22 #include "configfile.h" | 22 #include "configfile.h" |
23 #include "content.h" | 23 #include "content.h" |
24 #include "control.h" | |
24 #include "dynamicstring.h" | 25 #include "dynamicstring.h" |
25 #include "group.h" | 26 #include "group.h" |
26 #include "itemlist.h" | 27 #include "itemlist.h" |
27 #include "log.h" | 28 #include "log.h" |
28 #include "over.h" | 29 #include "over.h" |
968 Log_inf( "Retrieving %s", msgId ); | 969 Log_inf( "Retrieving %s", msgId ); |
969 s = new_DynStr( 5000 ); | 970 s = new_DynStr( 5000 ); |
970 while ( getTxtLn( line, &err ) && ! err ) | 971 while ( getTxtLn( line, &err ) && ! err ) |
971 DynStr_appLn( s, line ); | 972 DynStr_appLn( s, line ); |
972 if ( ! err ) | 973 if ( ! err ) |
973 Db_storeArt( msgId, DynStr_str( s ) ); | 974 { |
975 const char *txt; | |
976 | |
977 txt = DynStr_str( s ); | |
978 err = ! Db_storeArt( msgId, txt ); | |
979 if ( ! err ) | |
980 { | |
981 Str supersedeId; | |
982 | |
983 if ( Prt_searchHeader( txt, "Supersedes", supersedeId ) ) | |
984 Ctrl_cancel( supersedeId ); | |
985 } | |
986 } | |
974 else | 987 else |
975 retrievingFailed( msgId, "Connection broke down" ); | 988 retrievingFailed( msgId, "Connection broke down" ); |
976 del_DynStr( s ); | 989 del_DynStr( s ); |
977 return ! err; | 990 return ! err; |
978 } | 991 } |