1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-09-27 06:24:04 +00:00

Compare commits

..

7 Commits

Author SHA1 Message Date
Alexander Barton
ab1e81841b Debian package for 0.9.2. 2006-07-23 11:45:36 +00:00
Florian Westphal
957cdda1c0 fix format string (from HEAD) 2006-03-24 23:30:34 +00:00
Florian Westphal
c35b810b90 use strlcat return value; don't call time() repeatedly. [from HEAD] 2006-03-18 22:30:45 +00:00
Florian Westphal
3179bd3090 corrected return value (from HEAD) 2006-03-16 20:14:46 +00:00
Florian Westphal
f95d813064 removed redundant (foo) { if (foo){} } clause (from HEAD) 2006-03-16 20:03:14 +00:00
Florian Westphal
a854a38616 log.c and log.h from CVSHEAD (adds LogDebug() Function) 2006-02-08 21:23:21 +00:00
Alexander Barton
51b22759b6 Return PING argument in PONG reply if STRICT_RFC is not defined [from HEAD].
Fixes Debian Bug #343200.
2005-12-15 11:01:59 +00:00
9 changed files with 352 additions and 327 deletions

525
config.guess vendored

File diff suppressed because it is too large Load Diff

50
config.sub vendored
View File

@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2005-07-08'
timestamp='2005-04-22'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,15 +21,14 @@ timestamp='2005-07-08'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@@ -84,11 +83,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
echo "$timestamp" ; exit 0 ;;
--version | -v )
echo "$version" ; exit ;;
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit ;;
echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -100,7 +99,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
exit ;;
exit 0;;
* )
break ;;
@@ -248,7 +247,6 @@ case $basic_machine in
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@@ -257,14 +255,13 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ms1 \
| msp430 \
| ns16k | ns32k \
| or32 \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
@@ -276,9 +273,6 @@ case $basic_machine in
| z8k)
basic_machine=$basic_machine-unknown
;;
m32c)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -327,7 +321,6 @@ case $basic_machine in
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@@ -336,7 +329,6 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| ms1-* \
| msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
@@ -344,7 +336,7 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
@@ -359,8 +351,6 @@ case $basic_machine in
| ymp-* \
| z8k-*)
;;
m32c-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -771,8 +761,9 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
or32 | or32-*)
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
@@ -1098,9 +1089,12 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
@@ -1187,8 +1181,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1206,7 +1199,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@@ -1395,9 +1388,6 @@ case $basic_machine in
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
@@ -1569,7 +1559,7 @@ case $basic_machine in
esac
echo $basic_machine$os
exit
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)

View File

@@ -1,4 +1,4 @@
ngircd (0.9.2-0ab1) unstable; urgency=low
ngircd (0.9.2-0ab1) stable; urgency=low
* New "upstream release" fixing a few bugs in 0.9.1.

View File

@@ -17,7 +17,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: client.c,v 1.84 2005/06/12 16:39:42 alex Exp $";
static char UNUSED id[] = "$Id: client.c,v 1.84.2.1 2006/03/24 23:30:34 fw Exp $";
#include "imp.h"
#include <assert.h>
@@ -296,11 +296,9 @@ Client_Destroy( CLIENT *Client, char *LogMsg, char *FwdMsg, bool SendQuit )
{
if( c->id[0] ) Log( LOG_NOTICE, "Client \"%s\" unregistered (connection %d): %s", c->id, c->conn_id, txt );
else Log( LOG_NOTICE, "Client unregistered (connection %d): %s", c->conn_id, txt );
}
else
{
if( c->id[0] ) Log( LOG_WARNING, "Unregistered unknown client \"%s\": %s", c->id, txt );
else Log( LOG_WARNING, "Unregistered unknown client: %s", c->id, txt );
} else {
Log(LOG_WARNING, "Unregistered unknown client \"%s\": %s",
c->id[0] ? c->id : "(No Nick)", txt );
}
}

View File

@@ -16,7 +16,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: conn.c,v 1.155.2.3 2005/10/11 19:28:47 alex Exp $";
static char UNUSED id[] = "$Id: conn.c,v 1.155.2.4 2006/03/18 22:30:45 fw Exp $";
#include "imp.h"
#include <assert.h>
@@ -93,7 +93,7 @@ LOCAL void Init_Conn_Struct PARAMS(( CONN_ID Idx ));
LOCAL bool Init_Socket PARAMS(( int Sock ));
LOCAL void New_Server PARAMS(( int Server, CONN_ID Idx ));
LOCAL void Read_Resolver_Result PARAMS(( int r_fd ));
LOCAL void Simple_Message PARAMS(( int Sock, char *Msg ));
LOCAL void Simple_Message PARAMS(( int Sock, const char *Msg ));
LOCAL int Count_Connections PARAMS(( struct sockaddr_in addr ));
LOCAL fd_set My_Listeners;
@@ -538,6 +538,7 @@ va_dcl
#endif
{
char buffer[COMMAND_LEN];
size_t len;
bool ok;
va_list ap;
@@ -583,8 +584,9 @@ va_dcl
Log(LOG_DEBUG, " -> connection %d: '%s'.", Idx, buffer);
#endif
strlcat( buffer, "\r\n", sizeof( buffer ));
ok = Conn_Write( Idx, buffer, strlen( buffer ));
len = strlcat( buffer, "\r\n", sizeof( buffer ));
assert(len < COMMAND_LEN);
ok = Conn_Write(Idx, buffer, len);
My_Connections[Idx].msg_out++;
va_end( ap );
@@ -1186,15 +1188,17 @@ Handle_Buffer( CONN_ID Idx )
char *ptr;
int len, delta;
bool action, result;
time_t starttime;
#ifdef ZLIB
bool old_z;
#endif
starttime = time(NULL);
result = false;
do
{
/* Check penalty */
if( My_Connections[Idx].delaytime > time( NULL )) return result;
if( My_Connections[Idx].delaytime > starttime) return result;
#ifdef ZLIB
/* ggf. noch unkomprimiete Daten weiter entpacken */
@@ -1691,9 +1695,10 @@ try_resolve:
LOCAL void
Simple_Message( int Sock, char *Msg )
Simple_Message( int Sock, const char *Msg )
{
char buf[COMMAND_LEN];
size_t len;
/* Write "simple" message to socket, without using compression
* or even the connection write buffers. Used e.g. for error
* messages by New_Connection(). */
@@ -1701,8 +1706,9 @@ Simple_Message( int Sock, char *Msg )
assert( Msg != NULL );
strlcpy( buf, Msg, sizeof buf - 2);
strlcat( buf, "\r\n", sizeof buf);
(void)write( Sock, buf, strlen( buf ) );
len = strlcat( buf, "\r\n", sizeof buf);
assert(len < COMMAND_LEN);
(void)write(Sock, buf, len);
} /* Simple_Error */

View File

@@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: irc-channel.c,v 1.30 2005/06/12 18:23:59 alex Exp $";
static char UNUSED id[] = "$Id: irc-channel.c,v 1.30.2.2 2006/03/16 20:14:46 fw Exp $";
#include "imp.h"
#include <assert.h>
@@ -90,14 +90,9 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
if( Client_Type( Client ) == CLIENT_USER )
{
/* Test if the user has reached his maximum channel count */
if( Client_Type( Client ) == CLIENT_USER )
{
if(( Conf_MaxJoins > 0 ) && ( Channel_CountForUser( Client ) >= Conf_MaxJoins ))
{
IRC_WriteStrClient( Client, ERR_TOOMANYCHANNELS_MSG, Client_ID( Client ), channame );
return CONNECTED;
}
}
if(( Conf_MaxJoins > 0 ) && ( Channel_CountForUser( Client ) >= Conf_MaxJoins ))
return IRC_WriteStrClient( Client, ERR_TOOMANYCHANNELS_MSG,
Client_ID( Client ), channame );
/* Existiert der Channel bereits, oder wird er im Moment neu erzeugt? */
if( is_new_chan )

View File

@@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: irc-login.c,v 1.44 2005/06/04 12:32:09 fw Exp $";
static char UNUSED id[] = "$Id: irc-login.c,v 1.44.2.1 2005/12/15 11:01:59 alex Exp $";
#include "imp.h"
#include <assert.h>
@@ -456,7 +456,15 @@ IRC_PING( CLIENT *Client, REQUEST *Req )
}
Log( LOG_DEBUG, "Connection %d: got PING, sending PONG ...", Client_Conn( Client ));
return IRC_WriteStrClient( Client, "PONG %s :%s", Client_ID( Client_ThisServer( )), Client_ID( Client ));
#ifdef STRICT_RFC
return IRC_WriteStrClient(Client, "PONG %s :%s",
Client_ID(Client_ThisServer()), Client_ID(Client));
#else
/* Some clients depend on the argument being returned in the PONG
* reply (not mentioned in any RFC, though) */
return IRC_WriteStrClient(Client, "PONG %s :%s",
Client_ID(Client_ThisServer( )), Req->argv[0]);
#endif
} /* IRC_PING */

View File

@@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: log.c,v 1.57.2.1 2005/08/29 11:19:48 alex Exp $";
static char UNUSED id[] = "$Id: log.c,v 1.57.2.2 2006/02/08 21:23:21 fw Exp $";
#include "imp.h"
#include <assert.h>
@@ -44,15 +44,15 @@ static char UNUSED id[] = "$Id: log.c,v 1.57.2.1 2005/08/29 11:19:48 alex Exp $"
#include "log.h"
LOCAL char Init_Txt[127];
LOCAL bool Is_Daemon;
static char Init_Txt[127];
static bool Is_Daemon;
#ifdef DEBUG
LOCAL char Error_File[FNAME_LEN];
static char Error_File[FNAME_LEN];
#endif
LOCAL void Wall_ServerNotice PARAMS(( char *Msg ));
static void Wall_ServerNotice PARAMS(( char *Msg ));
GLOBAL void
@@ -162,6 +162,35 @@ Log_Exit( void )
} /* Log_Exit */
# ifdef PROTOTYPES
GLOBAL void
LogDebug( const char *Format, ... )
# else
GLOBAL void
LogDebug( Format, va_alist )
const char *Format;
va_dcl
# endif
#ifdef DEBUG
{
char msg[MAX_LOG_MSG_LEN];
va_list ap;
if (!NGIRCd_Debug) return;
#ifdef PROTOTYPES
va_start( ap, Format );
#else
va_start( ap );
#endif
vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
va_end( ap );
Log(LOG_DEBUG, "%s", msg);
}
#else
{ /* do nothing */ }
#endif /* DEBUG */
#ifdef PROTOTYPES
GLOBAL void
Log( int Level, const char *Format, ... )
@@ -174,7 +203,6 @@ va_dcl
#endif
{
/* Eintrag in Logfile(s) schreiben */
char msg[MAX_LOG_MSG_LEN];
bool snotice;
va_list ap;
@@ -306,7 +334,7 @@ va_dcl
* Send log messages to users flagged with the "s" mode.
* @param Msg The message to send.
*/
LOCAL void
static void
Wall_ServerNotice( char *Msg )
{
CLIENT *c;

View File

@@ -8,7 +8,7 @@
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
* $Id: log.h,v 1.18 2005/06/24 19:55:10 alex Exp $
* $Id: log.h,v 1.18.2.1 2006/02/08 21:23:21 fw Exp $
*
* Logging functions (header)
*/
@@ -39,6 +39,7 @@ GLOBAL void Log_Init PARAMS(( bool Daemon_Mode ));
GLOBAL void Log_Exit PARAMS(( void ));
GLOBAL void Log PARAMS(( int Level, const char *Format, ... ));
GLOBAL void LogDebug PARAMS(( const char *Format, ... ));
GLOBAL void Log_Init_Resolver PARAMS(( void ));
GLOBAL void Log_Exit_Resolver PARAMS(( void ));