Mercurial > noffle
comparison src/outgoing.c @ 185:fed1334d766b noffle
[svn] * src/client.c: Change variable only used on constant to 'const'.
* src/filter.c: Add a couple of 'return's after ASSERT() to remove
compiler warnings about functions needing returns.
* NEWS,TODO,configure,configure.in,noffle.conf.example,docs/NOTES,
docs/noffle.conf.5,src/client.c,src/configfile.c,src/content.c,
src/control.c,src/database.c,src/fetch.c,src/fetchlist.c,src/filter.c,
src/group.c,src/lock.c,src/log.c,src/log.h,src/noffle.c,src/outgoing.c,
src/post.c,src/protocol.c,src/request.c,src/server.c,src/util.c:
Debug logging is always compiled and selected via noffle.conf. All debug
logs are classified as all, none, config, control, expire, fetch,
filter, newsbase, noffle, post, protocol, requests and server.
author | bears |
---|---|
date | Sun, 05 Aug 2001 09:24:22 +0100 |
parents | 125d79c9e586 |
children | 24d4cd032da5 |
comparison
equal
deleted
inserted
replaced
184:9854ea5f295f | 185:fed1334d766b |
---|---|
1 /* | 1 /* |
2 outgoing.c | 2 outgoing.c |
3 | 3 |
4 $Id: outgoing.c 60 2000-05-09 22:28:38Z uh1763 $ | 4 $Id: outgoing.c 300 2001-08-05 08:24:22Z 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 |
54 int r; | 54 int r; |
55 | 55 |
56 snprintf( dir, MAXCHAR, "%s/outgoing/%s", Cfg_spoolDir(), serv ); | 56 snprintf( dir, MAXCHAR, "%s/outgoing/%s", Cfg_spoolDir(), serv ); |
57 r = mkdir( dir, 0755 ); | 57 r = mkdir( dir, 0755 ); |
58 if ( r != 0 ) | 58 if ( r != 0 ) |
59 Log_dbg( "mkdir: %s", strerror( errno ) ); | 59 Log_dbg( LOG_DBG_NEWSBASE, "mkdir: %s", strerror( errno ) ); |
60 } | 60 } |
61 | 61 |
62 Bool | 62 Bool |
63 Out_add( const char *serv, const char *msgId, const DynStr *artTxt ) | 63 Out_add( const char *serv, const char *msgId, const DynStr *artTxt ) |
64 { | 64 { |
86 Str file; | 86 Str file; |
87 | 87 |
88 snprintf( file, MAXCHAR, "%s/outgoing/%s", Cfg_spoolDir(), serv ); | 88 snprintf( file, MAXCHAR, "%s/outgoing/%s", Cfg_spoolDir(), serv ); |
89 if ( ! ( outgoing.dir = opendir( file ) ) ) | 89 if ( ! ( outgoing.dir = opendir( file ) ) ) |
90 { | 90 { |
91 Log_dbg( "Cannot open %s", file ); | 91 Log_dbg( LOG_DBG_NEWSBASE, "Cannot open %s", file ); |
92 return FALSE; | 92 return FALSE; |
93 } | 93 } |
94 Utl_cpyStr( outgoing.serv, serv ); | 94 Utl_cpyStr( outgoing.serv, serv ); |
95 Out_next( NULL, NULL ); /* "." */ | 95 Out_next( NULL, NULL ); /* "." */ |
96 Out_next( NULL, NULL ); /* ".." */ | 96 Out_next( NULL, NULL ); /* ".." */ |
147 | 147 |
148 | 148 |
149 snprintf( servdir, MAXCHAR, "%s/outgoing", Cfg_spoolDir() ); | 149 snprintf( servdir, MAXCHAR, "%s/outgoing", Cfg_spoolDir() ); |
150 if ( ! ( d = opendir( servdir ) ) ) | 150 if ( ! ( d = opendir( servdir ) ) ) |
151 { | 151 { |
152 Log_dbg( "Cannot open %s", servdir ); | 152 Log_dbg( LOG_DBG_NEWSBASE, "Cannot open %s", servdir ); |
153 return FALSE; | 153 return FALSE; |
154 } | 154 } |
155 | 155 |
156 readdir( d ); /* '.' */ | 156 readdir( d ); /* '.' */ |
157 readdir( d ); /* '..' */ | 157 readdir( d ); /* '..' */ |