head 1.7; access; symbols SOURCE_RESTRUCTURING_BEFORE:1.6 LMTP2NNTP_1_2a1:1.6 LMTP2NNTP_1_1_1:1.5 LMTP2NNTP_1_1_0:1.5 LMTP2NNTP_1_1b4:1.5 LMTP2NNTP_1_1b3:1.5 LMTP2NNTP_1_1b2:1.5 LMTP2NNTP_1_1b1:1.5 LMTP2NNTP_1_0_0:1.5 LMTP2NNTP_0_9_7:1.5 LMTP2NNTP_0_9_6:1.5 LMTP2NNTP_0_9_5:1.5; locks; strict; comment @ * @; 1.7 date 2001.12.31.11.09.52; author thl; state dead; branches; next 1.6; 1.6 date 2001.12.11.11.53.11; author thl; state Exp; branches; next 1.5; 1.5 date 2001.09.11.13.41.22; author thl; state Exp; branches; next 1.4; 1.4 date 2001.09.11.06.37.53; author thl; state Exp; branches; next 1.3; 1.3 date 2001.09.10.06.54.06; author thl; state Exp; branches; next 1.2; 1.2 date 2001.09.07.15.02.08; author thl; state Exp; branches; next 1.1; 1.1 date 2001.09.07.13.53.16; author thl; state Exp; branches; next ; desc @@ 1.7 log @Mega-Commit: Finally restructure the lmtp2nntp source tree in order to clean it up. We especially use a consistent prefix for all inlined sources. @ text @/* ** Copyright (c) 2001 The OSSP Project ** Copyright (c) 2001 Cable & Wireless Deutschland ** ** This file is part of OSSP lmtp2nntp, an LMTP speaking local ** mailer which forwards mails as Usenet news articles via NNTP. ** It can be found at http://www.ossp.org/pkg/lmtp2nntp/. ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License ** as published by the Free Software Foundation; either version ** 2.0 of the License, or (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this file; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ** USA, or contact the OSSP project . ** ** lmtp2nntp.h: LMTP to NNTP global header */ #ifndef __LMTP2NNTP_H__ #define __LMTP2NNTP_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if defined(HAVE_DMALLOC_H) && defined(DMALLOC) #include "dmalloc.h" #endif #define log0(ctx,level,msg) \ l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg) #define log1(ctx,level,msg,a1) \ l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1) #define log2(ctx,level,msg,a1,a2) \ l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2) #define log3(ctx,level,msg,a1,a2,a3) \ l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2, a3) #define log4(ctx,level,msg,a1,a2,a3,a4) \ l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2, a3, a4) #define STMT(stuff) do { stuff } while (0) #define CU(returncode) STMT( rc = returncode; goto CUS; ) #define VCU STMT( goto CUS; ) #endif /* __LMTP2NNTP_H__ */ @ 1.6 log @switch to latest L2 version @ text @@ 1.5 log @msg.c is now l2 enabled; improved logging using foreign (aka sendmail queuing) id; now calculating and logging message size; @ text @d38 1 a38 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P" msg) d40 1 a40 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1) d42 1 a42 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2) d44 1 a44 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2, a3) d46 1 a46 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2, a3, a4) @ 1.4 log @cleaned FIXMEs regarding CU/CUS cleanup sequence logic @ text @d38 1 a38 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P: " msg) d40 1 a40 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P: " msg, a1) d42 1 a42 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P: " msg, a1, a2) d44 1 a44 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P: " msg, a1, a2, a3) d46 1 a46 1 l2_stream_log((ctx)->l2, L2_LEVEL_##level, "%P: " msg, a1, a2, a3, a4) @ 1.3 log @added *lot* of l2 logging @ text @d48 1 a48 2 #define ZERO 0 #define STMT(stuff) do { stuff } while (ZERO) d50 1 a50 3 //FIXME #define VCU STMT( goto CUS; ) //FIXME #define RETURN_WVAL(val) return (val) //FIXME #define RETURN_EXRC return (rc) @ 1.2 log @Replace ad-hoc tracing with L2_LEVEL_TRACE based approach. @ text @d45 9 @ 1.1 log @The -b option now works. L2 logging included. @ text @d30 7 @