]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.c
- wenn kein ListenPort definiert ist, so wird nun 6667 als Default verwendet.
[ngircd-alex.git] / src / ngircd / conn.c
index 5e2546a97efcce2abfbbfab355835b80d955c719..4283c2d3dd449fced85225c294f4dfdcc6e5bf75 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: conn.c,v 1.55 2002/03/13 00:15:55 alex Exp $
+ * $Id: conn.c,v 1.58 2002/03/29 22:54:35 alex Exp $
  *
  * connect.h: Verwaltung aller Netz-Verbindungen ("connections")
  */
@@ -163,7 +163,7 @@ GLOBAL VOID Conn_Exit( VOID )
 } /* Conn_Exit */
 
 
-GLOBAL BOOLEAN Conn_NewListener( CONST INT Port )
+GLOBAL BOOLEAN Conn_NewListener( CONST UINT Port )
 {
        /* Neuen Listen-Socket erzeugen: der Server wartet dann auf
         * dem angegebenen Port auf Verbindungen. Kann der Listen-
@@ -332,6 +332,10 @@ GLOBAL BOOLEAN Conn_WriteStr( CONN_ID Idx, CHAR *Format, ... )
        BOOLEAN ok;
        va_list ap;
 
+       assert( Idx >= 0 );
+       assert( My_Connections[Idx].sock > NONE );
+       assert( Format != NULL );
+       
        va_start( ap, Format );
        if( vsnprintf( buffer, COMMAND_LEN - 2, Format, ap ) == COMMAND_LEN - 2 )
        {
@@ -805,7 +809,7 @@ LOCAL VOID Check_Connections( VOID )
                                if( My_Connections[i].lastping < time( NULL ) - Conf_PongTimeout )
                                {
                                        /* Timeout */
-                                       Log( LOG_DEBUG, "Connection %d: Ping timeout.", i );
+                                       Log( LOG_DEBUG, "Connection %d: Ping timeout: %d seconds.", i, Conf_PongTimeout );
                                        Conn_Close( i, NULL, "Ping timeout", TRUE );
                                }
                        }