Removed "USE_" prefixes of configuration #defines.

This commit is contained in:
Alexander Barton 2003-12-26 15:55:07 +00:00
parent 05170bc94c
commit c40592d2ce
15 changed files with 73 additions and 69 deletions

View File

@ -10,6 +10,10 @@
-- ChangeLog -- -- ChangeLog --
ngIRCd CVSHEAD
- Removed "USE_" prefixes of configuration #defines.
ngIRCd 0.7.6 (2003-12-05) ngIRCd 0.7.6 (2003-12-05)
- Fixed abort() ("server crash") when INVITE'ing users to nonexistent - Fixed abort() ("server crash") when INVITE'ing users to nonexistent
@ -484,4 +488,4 @@ ngIRCd 0.0.1, 31.12.2001
-- --
$Id: ChangeLog,v 1.218 2003/12/05 13:40:44 alex Exp $ $Id: ChangeLog,v 1.219 2003/12/26 15:55:07 alex Exp $

View File

@ -8,7 +8,7 @@
# (at your option) any later version. # (at your option) any later version.
# Please read the file COPYING, README and AUTHORS for more information. # Please read the file COPYING, README and AUTHORS for more information.
# #
# $Id: configure.in,v 1.96 2003/11/04 00:41:07 alex Exp $ # $Id: configure.in,v 1.97 2003/12/26 15:55:07 alex Exp $
# #
# -- Initialisierung -- # -- Initialisierung --
@ -26,9 +26,9 @@ AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists]) AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled]) AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant]) AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
AH_TEMPLATE([USE_SYSLOG], [Define if syslog should be used for logging]) AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
AH_TEMPLATE([USE_ZLIB], [Define if zlib compression should be enabled]) AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
AH_TEMPLATE([USE_TCPWRAP], [Define if TCP wrappers should be used]) AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used]) AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
AH_TEMPLATE([RENDEZVOUS], [Define if Rendezvous support should be included]) AH_TEMPLATE([RENDEZVOUS], [Define if Rendezvous support should be included])
@ -162,7 +162,7 @@ AC_ARG_WITH(syslog,
] ]
) )
if test "$x_syslog_on" = "yes"; then if test "$x_syslog_on" = "yes"; then
AC_DEFINE(USE_SYSLOG, 1) AC_DEFINE(SYSLOG, 1)
AC_CHECK_HEADERS(syslog.h) AC_CHECK_HEADERS(syslog.h)
fi fi
@ -181,7 +181,7 @@ AC_ARG_WITH(zlib,
] ]
) )
if test "$x_zlib_on" = "yes"; then if test "$x_zlib_on" = "yes"; then
AC_DEFINE(USE_ZLIB, 1) AC_DEFINE(ZLIB, 1)
AC_CHECK_HEADERS(zlib.h) AC_CHECK_HEADERS(zlib.h)
fi fi
@ -198,7 +198,7 @@ AC_ARG_WITH(tcp-wrappers,
ptr = hosts_access; ptr = hosts_access;
],[ ],[
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(USE_TCPWRAP, 1) AC_DEFINE(TCPWRAP, 1)
x_tcpwrap_on=yes x_tcpwrap_on=yes
],[ ],[
AC_MSG_RESULT(no) AC_MSG_RESULT(no)

View File

@ -16,7 +16,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: conn-func.c,v 1.2 2003/11/05 23:24:48 alex Exp $"; static char UNUSED id[] = "$Id: conn-func.c,v 1.3 2003/12/26 15:55:07 alex Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -198,7 +198,7 @@ Conn_SendQ( CONN_ID Idx )
/* Laenge der Daten im Schreibbuffer liefern */ /* Laenge der Daten im Schreibbuffer liefern */
assert( Idx > NONE ); assert( Idx > NONE );
#ifdef USE_ZLIB #ifdef ZLIB
if( My_Connections[Idx].options & CONN_ZIP ) return My_Connections[Idx].zip.wdatalen; if( My_Connections[Idx].options & CONN_ZIP ) return My_Connections[Idx].zip.wdatalen;
else else
#endif #endif
@ -232,7 +232,7 @@ Conn_RecvQ( CONN_ID Idx )
/* Laenge der Daten im Lesebuffer liefern */ /* Laenge der Daten im Lesebuffer liefern */
assert( Idx > NONE ); assert( Idx > NONE );
#ifdef USE_ZLIB #ifdef ZLIB
if( My_Connections[Idx].options & CONN_ZIP ) return My_Connections[Idx].zip.rdatalen; if( My_Connections[Idx].options & CONN_ZIP ) return My_Connections[Idx].zip.rdatalen;
else else
#endif #endif

View File

@ -17,9 +17,9 @@
#define CONN_MODULE #define CONN_MODULE
#ifdef USE_ZLIB #ifdef ZLIB
static char UNUSED id[] = "$Id: conn-zip.c,v 1.3 2003/04/21 10:52:26 alex Exp $"; static char UNUSED id[] = "$Id: conn-zip.c,v 1.4 2003/12/26 15:55:07 alex Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>

View File

@ -8,13 +8,13 @@
* (at your option) any later version. * (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information. * Please read the file COPYING, README and AUTHORS for more information.
* *
* $Id: conn-zip.h,v 1.1 2002/12/30 16:07:23 alex Exp $ * $Id: conn-zip.h,v 1.2 2003/12/26 15:55:07 alex Exp $
* *
* Connection compression using ZLIB (header) * Connection compression using ZLIB (header)
*/ */
#ifdef USE_ZLIB #ifdef ZLIB
#ifndef __conn_zip_h__ #ifndef __conn_zip_h__
#define __conn_zip_h__ #define __conn_zip_h__
@ -32,7 +32,7 @@ GLOBAL LONG Zip_RecvBytes PARAMS(( CONN_ID Idx ));
#endif /* __conn_zip_h__ */ #endif /* __conn_zip_h__ */
#endif /* USE_ZLIB */ #endif /* ZLIB */
/* -eof- */ /* -eof- */

View File

@ -16,7 +16,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: conn.c,v 1.127 2003/11/05 23:24:48 alex Exp $"; static char UNUSED id[] = "$Id: conn.c,v 1.128 2003/12/26 15:55:07 alex Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -43,7 +43,7 @@ static char UNUSED id[] = "$Id: conn.c,v 1.127 2003/11/05 23:24:48 alex Exp $";
#include <stdint.h> /* e.g. for Mac OS X */ #include <stdint.h> /* e.g. for Mac OS X */
#endif #endif
#ifdef USE_TCPWRAP #ifdef TCPWRAP
#include <tcpd.h> /* for TCP Wrappers */ #include <tcpd.h> /* for TCP Wrappers */
#endif #endif
@ -93,7 +93,7 @@ LOCAL fd_set My_Listeners;
LOCAL fd_set My_Sockets; LOCAL fd_set My_Sockets;
LOCAL fd_set My_Connects; LOCAL fd_set My_Connects;
#ifdef USE_TCPWRAP #ifdef TCPWRAP
INT allow_severity = LOG_INFO; INT allow_severity = LOG_INFO;
INT deny_severity = LOG_ERR; INT deny_severity = LOG_ERR;
#endif #endif
@ -395,7 +395,7 @@ Conn_Handler( VOID )
FD_ZERO( &write_sockets ); FD_ZERO( &write_sockets );
for( i = 0; i < Pool_Size; i++ ) for( i = 0; i < Pool_Size; i++ )
{ {
#ifdef USE_ZLIB #ifdef ZLIB
if(( My_Connections[i].sock > NONE ) && (( My_Connections[i].wdatalen > 0 ) || ( My_Connections[i].zip.wdatalen > 0 ))) if(( My_Connections[i].sock > NONE ) && (( My_Connections[i].wdatalen > 0 ) || ( My_Connections[i].zip.wdatalen > 0 )))
#else #else
if(( My_Connections[i].sock > NONE ) && ( My_Connections[i].wdatalen > 0 )) if(( My_Connections[i].sock > NONE ) && ( My_Connections[i].wdatalen > 0 ))
@ -581,7 +581,7 @@ Conn_Write( CONN_ID Idx, CHAR *Data, INT Len )
} }
} }
#ifdef USE_ZLIB #ifdef ZLIB
if( My_Connections[Idx].options & CONN_ZIP ) if( My_Connections[Idx].options & CONN_ZIP )
{ {
/* Daten komprimieren und in Puffer kopieren */ /* Daten komprimieren und in Puffer kopieren */
@ -611,7 +611,7 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient )
CLIENT *c; CLIENT *c;
DOUBLE in_k, out_k; DOUBLE in_k, out_k;
#ifdef USE_ZLIB #ifdef ZLIB
DOUBLE in_z_k, out_z_k; DOUBLE in_z_k, out_z_k;
INT in_p, out_p; INT in_p, out_p;
#endif #endif
@ -673,7 +673,7 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient )
/* Calculate statistics and log information */ /* Calculate statistics and log information */
in_k = (DOUBLE)My_Connections[Idx].bytes_in / 1024; in_k = (DOUBLE)My_Connections[Idx].bytes_in / 1024;
out_k = (DOUBLE)My_Connections[Idx].bytes_out / 1024; out_k = (DOUBLE)My_Connections[Idx].bytes_out / 1024;
#ifdef USE_ZLIB #ifdef ZLIB
if( My_Connections[Idx].options & CONN_ZIP ) if( My_Connections[Idx].options & CONN_ZIP )
{ {
in_z_k = (DOUBLE)My_Connections[Idx].zip.bytes_in / 1024; in_z_k = (DOUBLE)My_Connections[Idx].zip.bytes_in / 1024;
@ -701,7 +701,7 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient )
/* Servers: Modify time of next connect attempt? */ /* Servers: Modify time of next connect attempt? */
Conf_UnsetServer( Idx ); Conf_UnsetServer( Idx );
#ifdef USE_ZLIB #ifdef ZLIB
/* Clean up zlib, if link was compressed */ /* Clean up zlib, if link was compressed */
if( Conn_Options( Idx ) & CONN_ZIP ) if( Conn_Options( Idx ) & CONN_ZIP )
{ {
@ -762,7 +762,7 @@ Try_Write( CONN_ID Idx )
assert( My_Connections[Idx].sock > NONE ); assert( My_Connections[Idx].sock > NONE );
/* sind ueberhaupt Daten vorhanden? */ /* sind ueberhaupt Daten vorhanden? */
#ifdef USE_ZLIB #ifdef ZLIB
if(( ! My_Connections[Idx].wdatalen > 0 ) && ( ! My_Connections[Idx].zip.wdatalen )) return TRUE; if(( ! My_Connections[Idx].wdatalen > 0 ) && ( ! My_Connections[Idx].zip.wdatalen )) return TRUE;
#else #else
if( ! My_Connections[Idx].wdatalen > 0 ) return TRUE; if( ! My_Connections[Idx].wdatalen > 0 ) return TRUE;
@ -877,7 +877,7 @@ Handle_Write( CONN_ID Idx )
return Conn_WriteStr( Idx, "SERVER %s :%s", Conf_ServerName, Conf_ServerInfo ); return Conn_WriteStr( Idx, "SERVER %s :%s", Conf_ServerName, Conf_ServerInfo );
} }
#ifdef USE_ZLIB #ifdef ZLIB
/* Schreibpuffer leer, aber noch Daten im Kompressionsbuffer? /* Schreibpuffer leer, aber noch Daten im Kompressionsbuffer?
* Dann muss dieser nun geflushed werden! */ * Dann muss dieser nun geflushed werden! */
if( My_Connections[Idx].wdatalen == 0 ) Zip_Flush( Idx ); if( My_Connections[Idx].wdatalen == 0 ) Zip_Flush( Idx );
@ -912,7 +912,7 @@ New_Connection( INT Sock )
/* Neue Client-Verbindung von Listen-Socket annehmen und /* Neue Client-Verbindung von Listen-Socket annehmen und
* CLIENT-Struktur anlegen. */ * CLIENT-Struktur anlegen. */
#ifdef USE_TCPWRAP #ifdef TCPWRAP
struct request_info req; struct request_info req;
#endif #endif
struct sockaddr_in new_addr; struct sockaddr_in new_addr;
@ -934,7 +934,7 @@ New_Connection( INT Sock )
return; return;
} }
#ifdef USE_TCPWRAP #ifdef TCPWRAP
/* Validate socket using TCP Wrappers */ /* Validate socket using TCP Wrappers */
request_init( &req, RQ_DAEMON, PACKAGE_NAME, RQ_FILE, new_sock, RQ_CLIENT_SIN, &new_addr, NULL ); request_init( &req, RQ_DAEMON, PACKAGE_NAME, RQ_FILE, new_sock, RQ_CLIENT_SIN, &new_addr, NULL );
if( ! hosts_access( &req )) if( ! hosts_access( &req ))
@ -1097,7 +1097,7 @@ Read_Request( CONN_ID Idx )
* Tritt ein Fehler auf, so wird der Socket geschlossen. */ * Tritt ein Fehler auf, so wird der Socket geschlossen. */
INT len, bsize; INT len, bsize;
#ifdef USE_ZLIB #ifdef ZLIB
CLIENT *c; CLIENT *c;
#endif #endif
@ -1107,12 +1107,12 @@ Read_Request( CONN_ID Idx )
/* wenn noch nicht registriert: maximal mit ZREADBUFFER_LEN arbeiten, /* wenn noch nicht registriert: maximal mit ZREADBUFFER_LEN arbeiten,
* ansonsten koennen Daten ggf. nicht umkopiert werden. */ * ansonsten koennen Daten ggf. nicht umkopiert werden. */
bsize = READBUFFER_LEN; bsize = READBUFFER_LEN;
#ifdef USE_ZLIB #ifdef ZLIB
c = Client_GetFromConn( Idx ); c = Client_GetFromConn( Idx );
if(( Client_Type( c ) != CLIENT_USER ) && ( Client_Type( c ) != CLIENT_SERVER ) && ( Client_Type( c ) != CLIENT_SERVICE ) && ( bsize > ZREADBUFFER_LEN )) bsize = ZREADBUFFER_LEN; if(( Client_Type( c ) != CLIENT_USER ) && ( Client_Type( c ) != CLIENT_SERVER ) && ( Client_Type( c ) != CLIENT_SERVICE ) && ( bsize > ZREADBUFFER_LEN )) bsize = ZREADBUFFER_LEN;
#endif #endif
#ifdef USE_ZLIB #ifdef ZLIB
if(( bsize - My_Connections[Idx].rdatalen - 1 < 1 ) || ( ZREADBUFFER_LEN - My_Connections[Idx].zip.rdatalen < 1 )) if(( bsize - My_Connections[Idx].rdatalen - 1 < 1 ) || ( ZREADBUFFER_LEN - My_Connections[Idx].zip.rdatalen < 1 ))
#else #else
if( bsize - My_Connections[Idx].rdatalen - 1 < 1 ) if( bsize - My_Connections[Idx].rdatalen - 1 < 1 )
@ -1124,7 +1124,7 @@ Read_Request( CONN_ID Idx )
return; return;
} }
#ifdef USE_ZLIB #ifdef ZLIB
if( My_Connections[Idx].options & CONN_ZIP ) if( My_Connections[Idx].options & CONN_ZIP )
{ {
len = recv( My_Connections[Idx].sock, My_Connections[Idx].zip.rbuf + My_Connections[Idx].zip.rdatalen, ( ZREADBUFFER_LEN - My_Connections[Idx].zip.rdatalen ), 0 ); len = recv( My_Connections[Idx].sock, My_Connections[Idx].zip.rbuf + My_Connections[Idx].zip.rdatalen, ( ZREADBUFFER_LEN - My_Connections[Idx].zip.rdatalen ), 0 );
@ -1179,7 +1179,7 @@ Handle_Buffer( CONN_ID Idx )
CHAR *ptr; CHAR *ptr;
INT len, delta; INT len, delta;
BOOLEAN action, result; BOOLEAN action, result;
#ifdef USE_ZLIB #ifdef ZLIB
BOOLEAN old_z; BOOLEAN old_z;
#endif #endif
@ -1189,7 +1189,7 @@ Handle_Buffer( CONN_ID Idx )
/* Check penalty */ /* Check penalty */
if( My_Connections[Idx].delaytime > time( NULL )) return result; if( My_Connections[Idx].delaytime > time( NULL )) return result;
#ifdef USE_ZLIB #ifdef ZLIB
/* ggf. noch unkomprimiete Daten weiter entpacken */ /* ggf. noch unkomprimiete Daten weiter entpacken */
if( My_Connections[Idx].options & CONN_ZIP ) if( My_Connections[Idx].options & CONN_ZIP )
{ {
@ -1235,7 +1235,7 @@ Handle_Buffer( CONN_ID Idx )
return FALSE; return FALSE;
} }
#ifdef USE_ZLIB #ifdef ZLIB
/* merken, ob Stream bereits komprimiert wird */ /* merken, ob Stream bereits komprimiert wird */
old_z = My_Connections[Idx].options & CONN_ZIP; old_z = My_Connections[Idx].options & CONN_ZIP;
#endif #endif
@ -1252,7 +1252,7 @@ Handle_Buffer( CONN_ID Idx )
My_Connections[Idx].rdatalen -= len; My_Connections[Idx].rdatalen -= len;
memmove( My_Connections[Idx].rbuf, My_Connections[Idx].rbuf + len, My_Connections[Idx].rdatalen ); memmove( My_Connections[Idx].rbuf, My_Connections[Idx].rbuf + len, My_Connections[Idx].rdatalen );
#ifdef USE_ZLIB #ifdef ZLIB
if(( ! old_z ) && ( My_Connections[Idx].options & CONN_ZIP ) && ( My_Connections[Idx].rdatalen > 0 )) if(( ! old_z ) && ( My_Connections[Idx].options & CONN_ZIP ) && ( My_Connections[Idx].rdatalen > 0 ))
{ {
/* Mit dem letzten Befehl wurde Socket-Kompression aktiviert. /* Mit dem letzten Befehl wurde Socket-Kompression aktiviert.
@ -1531,7 +1531,7 @@ Init_Conn_Struct( CONN_ID Idx )
My_Connections[Idx].flag = 0; My_Connections[Idx].flag = 0;
My_Connections[Idx].options = 0; My_Connections[Idx].options = 0;
#ifdef USE_ZLIB #ifdef ZLIB
My_Connections[Idx].zip.rbuf[0] = '\0'; My_Connections[Idx].zip.rbuf[0] = '\0';
My_Connections[Idx].zip.rdatalen = 0; My_Connections[Idx].zip.rdatalen = 0;
My_Connections[Idx].zip.wbuf[0] = '\0'; My_Connections[Idx].zip.wbuf[0] = '\0';

View File

@ -8,7 +8,7 @@
* (at your option) any later version. * (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information. * Please read the file COPYING, README and AUTHORS for more information.
* *
* $Id: conn.h,v 1.31 2003/03/27 01:20:22 alex Exp $ * $Id: conn.h,v 1.32 2003/12/26 15:55:07 alex Exp $
* *
* Connection management (header) * Connection management (header)
*/ */
@ -23,7 +23,7 @@
#define CONN_ISCLOSING 1 /* Conn_Close() already called */ #define CONN_ISCLOSING 1 /* Conn_Close() already called */
#ifdef USE_ZLIB #ifdef ZLIB
#define CONN_ZIP 2 /* zlib compressed link */ #define CONN_ZIP 2 /* zlib compressed link */
#endif #endif
@ -36,7 +36,7 @@ typedef INT CONN_ID;
#include "defines.h" #include "defines.h"
#include "resolve.h" #include "resolve.h"
#ifdef USE_ZLIB #ifdef ZLIB
#include <zlib.h> #include <zlib.h>
typedef struct _ZipData typedef struct _ZipData
{ {
@ -48,7 +48,7 @@ typedef struct _ZipData
INT wdatalen; /* Length of data in write buffer (uncompressed) */ INT wdatalen; /* Length of data in write buffer (uncompressed) */
LONG bytes_in, bytes_out; /* Counter for statistics (uncompressed!) */ LONG bytes_in, bytes_out; /* Counter for statistics (uncompressed!) */
} ZIPDATA; } ZIPDATA;
#endif /* USE_ZLIB */ #endif /* ZLIB */
typedef struct _Connection typedef struct _Connection
{ {
@ -69,9 +69,9 @@ typedef struct _Connection
LONG msg_in, msg_out; /* Received and sent IRC messages */ LONG msg_in, msg_out; /* Received and sent IRC messages */
INT flag; /* Flag (see "irc-write" module) */ INT flag; /* Flag (see "irc-write" module) */
INT options; /* Link options */ INT options; /* Link options */
#ifdef USE_ZLIB #ifdef ZLIB
ZIPDATA zip; /* Compression information */ ZIPDATA zip; /* Compression information */
#endif /* USE_ZLIB */ #endif /* ZLIB */
} CONNECTION; } CONNECTION;
GLOBAL CONNECTION *My_Connections; GLOBAL CONNECTION *My_Connections;

View File

@ -8,7 +8,7 @@
* (at your option) any later version. * (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information. * Please read the file COPYING, README and AUTHORS for more information.
* *
* $Id: defines.h,v 1.43 2003/11/05 23:24:48 alex Exp $ * $Id: defines.h,v 1.44 2003/12/26 15:55:07 alex Exp $
* *
* Global defines of ngIRCd. * Global defines of ngIRCd.
*/ */
@ -57,7 +57,7 @@
#define READBUFFER_LEN 2048 /* Laenge des Lesepuffers je Verbindung (Bytes) */ #define READBUFFER_LEN 2048 /* Laenge des Lesepuffers je Verbindung (Bytes) */
#define WRITEBUFFER_LEN 4096 /* Laenge des Schreibpuffers je Verbindung (Bytes) */ #define WRITEBUFFER_LEN 4096 /* Laenge des Schreibpuffers je Verbindung (Bytes) */
#ifdef USE_ZLIB #ifdef ZLIB
#define ZREADBUFFER_LEN 1024 /* Laenge des Lesepuffers je Verbindung (Bytes) */ #define ZREADBUFFER_LEN 1024 /* Laenge des Lesepuffers je Verbindung (Bytes) */
#define ZWRITEBUFFER_LEN 4096 /* Laenge des Schreibpuffers fuer Kompression (Bytes) */ #define ZWRITEBUFFER_LEN 4096 /* Laenge des Schreibpuffers fuer Kompression (Bytes) */
#endif #endif

View File

@ -14,7 +14,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: irc-info.c,v 1.19 2003/12/04 14:05:16 alex Exp $"; static char UNUSED id[] = "$Id: irc-info.c,v 1.20 2003/12/26 15:55:07 alex Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -379,7 +379,7 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
if( cl && (( Client_Type( cl ) == CLIENT_SERVER ) || ( cl == Client ))) if( cl && (( Client_Type( cl ) == CLIENT_SERVER ) || ( cl == Client )))
{ {
/* Server link or our own connection */ /* Server link or our own connection */
#ifdef USE_ZLIB #ifdef ZLIB
if( Conn_Options( con ) & CONN_ZIP ) if( Conn_Options( con ) & CONN_ZIP )
{ {
if( ! IRC_WriteStrClient( from, RPL_STATSLINKINFOZIP_MSG, Client_ID( from ), Client_Mask( cl ), Conn_SendQ( con ), Conn_SendMsg( con ), Zip_SendBytes( con ), Conn_SendBytes( con ), Conn_RecvMsg( con ), Zip_RecvBytes( con ), Conn_RecvBytes( con ), (LONG)( time( NULL ) - Conn_StartTime( con )))) return DISCONNECTED; if( ! IRC_WriteStrClient( from, RPL_STATSLINKINFOZIP_MSG, Client_ID( from ), Client_Mask( cl ), Conn_SendQ( con ), Conn_SendMsg( con ), Zip_SendBytes( con ), Conn_SendBytes( con ), Conn_RecvMsg( con ), Zip_RecvBytes( con ), Conn_RecvBytes( con ), (LONG)( time( NULL ) - Conn_StartTime( con )))) return DISCONNECTED;

View File

@ -14,7 +14,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: irc-server.c,v 1.33 2003/07/09 18:45:56 alex Exp $"; static char UNUSED id[] = "$Id: irc-server.c,v 1.34 2003/12/26 15:55:07 alex Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -117,7 +117,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
Client_SetType( Client, CLIENT_SERVER ); Client_SetType( Client, CLIENT_SERVER );
Conf_SetServer( i, con ); Conf_SetServer( i, con );
#ifdef USE_ZLIB #ifdef ZLIB
/* Kompression initialisieren, wenn erforderlich */ /* Kompression initialisieren, wenn erforderlich */
if( strchr( Client_Flags( Client ), 'Z' )) if( strchr( Client_Flags( Client ), 'Z' ))
{ {

View File

@ -14,7 +14,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: irc.c,v 1.122 2003/11/05 23:24:48 alex Exp $"; static char UNUSED id[] = "$Id: irc.c,v 1.123 2003/12/26 15:55:07 alex Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -302,7 +302,7 @@ Option_String( CONN_ID Idx )
options = Conn_Options( Idx ); options = Conn_Options( Idx );
strcpy( option_txt, "F" ); /* No idea what this means but the original ircd sends it ... */ strcpy( option_txt, "F" ); /* No idea what this means but the original ircd sends it ... */
#ifdef USE_ZLIB #ifdef ZLIB
if( options & CONN_ZIP ) strcat( option_txt, "z" ); if( options & CONN_ZIP ) strcat( option_txt, "z" );
#endif #endif

View File

@ -14,7 +14,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: log.c,v 1.43 2003/03/31 15:54:21 alex Exp $"; static char UNUSED id[] = "$Id: log.c,v 1.44 2003/12/26 15:55:07 alex Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -25,7 +25,7 @@ static char UNUSED id[] = "$Id: log.c,v 1.43 2003/03/31 15:54:21 alex Exp $";
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#ifdef USE_SYSLOG #ifdef SYSLOG
#include <syslog.h> #include <syslog.h>
#endif #endif
@ -50,7 +50,7 @@ LOCAL VOID Wall_ServerNotice PARAMS(( CHAR *Msg ));
GLOBAL VOID GLOBAL VOID
Log_Init( VOID ) Log_Init( VOID )
{ {
#ifdef USE_SYSLOG #ifdef SYSLOG
/* Syslog initialisieren */ /* Syslog initialisieren */
openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 ); openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 );
#endif #endif
@ -125,7 +125,7 @@ Log_Exit( VOID )
/* Error-File (stderr) loeschen */ /* Error-File (stderr) loeschen */
if( unlink( Error_File ) != 0 ) Log( LOG_ERR, "Can't delete \"%s\": %s", Error_File, strerror( errno )); if( unlink( Error_File ) != 0 ) Log( LOG_ERR, "Can't delete \"%s\": %s", Error_File, strerror( errno ));
#ifdef USE_SYSLOG #ifdef SYSLOG
/* syslog abmelden */ /* syslog abmelden */
closelog( ); closelog( );
#endif #endif
@ -180,7 +180,7 @@ va_dcl
fprintf( stdout, "[%d] %s\n", Level, msg ); fprintf( stdout, "[%d] %s\n", Level, msg );
fflush( stdout ); fflush( stdout );
} }
#ifdef USE_SYSLOG #ifdef SYSLOG
else else
{ {
/* Syslog */ /* Syslog */
@ -206,7 +206,7 @@ va_dcl
GLOBAL VOID GLOBAL VOID
Log_Init_Resolver( VOID ) Log_Init_Resolver( VOID )
{ {
#ifdef USE_SYSLOG #ifdef SYSLOG
openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 ); openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 );
#endif #endif
} /* Log_Init_Resolver */ } /* Log_Init_Resolver */
@ -215,7 +215,7 @@ Log_Init_Resolver( VOID )
GLOBAL VOID GLOBAL VOID
Log_Exit_Resolver( VOID ) Log_Exit_Resolver( VOID )
{ {
#ifdef USE_SYSLOG #ifdef SYSLOG
closelog( ); closelog( );
#endif #endif
} /* Log_Exit_Resolver */ } /* Log_Exit_Resolver */
@ -234,7 +234,7 @@ va_dcl
{ {
/* Eintrag des Resolver in Logfile(s) schreiben */ /* Eintrag des Resolver in Logfile(s) schreiben */
#ifndef USE_SYSLOG #ifndef SYSLOG
return; return;
#else #else

View File

@ -8,7 +8,7 @@
* (at your option) any later version. * (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information. * Please read the file COPYING, README and AUTHORS for more information.
* *
* $Id: log.h,v 1.13 2002/12/12 12:23:43 alex Exp $ * $Id: log.h,v 1.14 2003/12/26 15:55:07 alex Exp $
* *
* Logging functions (header) * Logging functions (header)
*/ */
@ -18,7 +18,7 @@
#define __log_h__ #define __log_h__
#ifdef USE_SYSLOG #ifdef SYSLOG
# include <syslog.h> # include <syslog.h>
#else #else
# define LOG_EMERG 0 # define LOG_EMERG 0

View File

@ -8,7 +8,7 @@
* (at your option) any later version. * (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information. * Please read the file COPYING, README and AUTHORS for more information.
* *
* $Id: messages.h,v 1.64 2003/03/19 21:16:16 alex Exp $ * $Id: messages.h,v 1.65 2003/12/26 15:55:07 alex Exp $
* *
* IRC numerics (Header) * IRC numerics (Header)
*/ */
@ -117,7 +117,7 @@
#define ERR_UMODEUNKNOWNFLAG2_MSG "501 %s :Unknown mode \"%c%c\"" #define ERR_UMODEUNKNOWNFLAG2_MSG "501 %s :Unknown mode \"%c%c\""
#define ERR_USERSDONTMATCH_MSG "502 %s :Can't set/get mode for other users" #define ERR_USERSDONTMATCH_MSG "502 %s :Can't set/get mode for other users"
#ifdef USE_ZLIB #ifdef ZLIB
#define RPL_STATSLINKINFOZIP_MSG "211 %s %s %d %ld %ld/%ld %ld %ld/%ld :%ld" #define RPL_STATSLINKINFOZIP_MSG "211 %s %s %d %ld %ld/%ld %ld %ld/%ld :%ld"
#endif #endif

View File

@ -14,7 +14,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: ngircd.c,v 1.77 2003/06/05 10:48:13 alex Exp $"; static char UNUSED id[] = "$Id: ngircd.c,v 1.78 2003/12/26 15:55:07 alex Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -298,7 +298,7 @@ main( int argc, const char *argv[] )
* sind in doc/Protocol.txt beschrieben. */ * sind in doc/Protocol.txt beschrieben. */
#ifdef IRCPLUS #ifdef IRCPLUS
sprintf( NGIRCd_ProtoID, "%s%s %s|%s:%s", PROTOVER, PROTOIRCPLUS, PACKAGE_NAME, PACKAGE_VERSION, IRCPLUSFLAGS ); sprintf( NGIRCd_ProtoID, "%s%s %s|%s:%s", PROTOVER, PROTOIRCPLUS, PACKAGE_NAME, PACKAGE_VERSION, IRCPLUSFLAGS );
#ifdef USE_ZLIB #ifdef ZLIB
strcat( NGIRCd_ProtoID, "Z" ); strcat( NGIRCd_ProtoID, "Z" );
#endif #endif
if( Conf_OperCanMode ) strcat( NGIRCd_ProtoID, "o" ); if( Conf_OperCanMode ) strcat( NGIRCd_ProtoID, "o" );
@ -306,7 +306,7 @@ main( int argc, const char *argv[] )
sprintf( NGIRCd_ProtoID, "%s%s %s|%s", PROTOVER, PROTOIRC, PACKAGE_NAME, PACKAGE_VERSION ); sprintf( NGIRCd_ProtoID, "%s%s %s|%s", PROTOVER, PROTOIRC, PACKAGE_NAME, PACKAGE_VERSION );
#endif #endif
strcat( NGIRCd_ProtoID, " P" ); strcat( NGIRCd_ProtoID, " P" );
#ifdef USE_ZLIB #ifdef ZLIB
strcat( NGIRCd_ProtoID, "Z" ); strcat( NGIRCd_ProtoID, "Z" );
#endif #endif
Log( LOG_DEBUG, "Protocol and server ID is \"%s\".", NGIRCd_ProtoID ); Log( LOG_DEBUG, "Protocol and server ID is \"%s\".", NGIRCd_ProtoID );
@ -361,15 +361,15 @@ NGIRCd_VersionAddition( VOID )
strcpy( txt, "" ); strcpy( txt, "" );
#ifdef USE_SYSLOG #ifdef SYSLOG
if( txt[0] ) strcat( txt, "+" ); if( txt[0] ) strcat( txt, "+" );
strcat( txt, "SYSLOG" ); strcat( txt, "SYSLOG" );
#endif #endif
#ifdef USE_ZLIB #ifdef ZLIB
if( txt[0] ) strcat( txt, "+" ); if( txt[0] ) strcat( txt, "+" );
strcat( txt, "ZLIB" ); strcat( txt, "ZLIB" );
#endif #endif
#ifdef USE_TCPWRAP #ifdef TCPWRAP
if( txt[0] ) strcat( txt, "+" ); if( txt[0] ) strcat( txt, "+" );
strcat( txt, "TCPWRAP" ); strcat( txt, "TCPWRAP" );
#endif #endif