From 8a927a1b6aa95e716948aa21ed591381a2676ffc Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sat, 7 Sep 2002 22:34:44 +0000 Subject: [PATCH] =?utf8?q?-=20Penalty-Delays=20gelten=20nun=20auch=20fu?= =?utf8?q?=CC=88r=20Schreibvorgaenge.=20-=20Conn=5FHandler()=20besser=20st?= =?utf8?q?rukturiert=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/ngircd/conn.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index 3e2ca2fa..76b0822b 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -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.71 2002/09/07 21:35:06 alex Exp $ + * $Id: conn.c,v 1.72 2002/09/07 22:34:44 alex Exp $ * * connect.h: Verwaltung aller Netz-Verbindungen ("connections") */ @@ -289,6 +289,7 @@ Conn_Handler( VOID ) { /* Fuer die Verbindung ist eine "Penalty-Zeit" gesetzt */ FD_CLR( My_Connections[i].sock, &read_sockets ); + FD_CLR( My_Connections[i].sock, &write_sockets ); } } for( i = 0; i < Conn_MaxFD + 1; i++ ) @@ -305,15 +306,22 @@ Conn_Handler( VOID ) tv.tv_usec = 0; /* Auf Aktivitaet warten */ - if( select( Conn_MaxFD + 1, &read_sockets, &write_sockets, NULL, &tv ) == -1 ) + i = select( Conn_MaxFD + 1, &read_sockets, &write_sockets, NULL, &tv ); + if( i == 0 ) { + /* keine Veraenderung an den Sockets */ + continue; + } + if( i == -1 ) + { + /* Fehler (z.B. Interrupt) */ if( errno != EINTR ) { Log( LOG_EMERG, "select(): %s!", strerror( errno )); Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE ); exit( 1 ); } - if(( ! NGIRCd_Quit ) && ( ! NGIRCd_Restart )) continue; + continue; } /* Koennen Daten geschrieben werden? */ -- 2.39.2