X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Fngircd%2Fconn-func.c;h=ed58f7280254bfad8b647fe57c2383253cbcd3c4;hb=e8e04b4c8fd63d075ffa6b85327c4b90d7005051;hp=0ba0ff6c1915932c1cd09448b53b42bd6bc89cd7;hpb=43fb18f2f5a506c4d78967e4b6e961b7339c98dc;p=ngircd.git diff --git a/src/ngircd/conn-func.c b/src/ngircd/conn-func.c index 0ba0ff6c..ed58f728 100644 --- a/src/ngircd/conn-func.c +++ b/src/ngircd/conn-func.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2008 Alexander Barton (alex@barton.de) + * Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors. * * 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 @@ -18,15 +18,14 @@ * Connection management: Global functions */ -#include "imp.h" #include -#include -#include "log.h" +#include +#ifdef DEBUG +# include "log.h" +#endif #include "conn.h" -#include "client.h" -#include "exp.h" #include "conn-func.h" /** @@ -86,7 +85,7 @@ Conn_LastPing( CONN_ID Idx ) * is read. This function only increases the penalty, it is not possible to * decrease the penalty time. * - * @param Idex Connection index. + * @param Idx Connection index. * @param Seconds Seconds to add. * @see Conn_ResetPenalty */ @@ -139,7 +138,7 @@ GLOBAL CONN_ID Conn_First( void ) { CONN_ID i; - + for( i = 0; i < Pool_Size; i++ ) { if( My_Connections[i].sock != NONE ) return i; @@ -153,7 +152,7 @@ Conn_Next( CONN_ID Idx ) CONN_ID i = NONE; assert( Idx > NONE ); - + for( i = Idx + 1; i < Pool_Size; i++ ) { if( My_Connections[i].sock != NONE ) return i;