repo: ngircd action: commit revision: path_from: revision_from: 6250dcb1dccd619ba3cd70b3335b75a0c926b3e9: path_to: revision_to:
commit 6250dcb1dccd619ba3cd70b3335b75a0c926b3e9 Author: Alexander BartonDate: Mon Nov 11 00:54:25 2002 +0000 - Fehler-Handling von connect() gefixed: der Server kann sich nun auch unter A/UX wieder zu anderen verbinden. diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
--- 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.88 2002/11/05 14:18:39 alex Exp $
+ * $Id: conn.c,v 1.89 2002/11/11 00:54:25 alex Exp $
*
* connect.h: Verwaltung aller Netz-Verbindungen ("connections")
*/
@@ -1186,7 +1186,7 @@ New_Server( INT Server, CONN_ID Idx )
struct sockaddr_in new_addr;
struct in_addr inaddr;
- INT new_sock;
+ INT res, new_sock;
CLIENT *c;
assert( Server > NONE );
@@ -1232,13 +1232,12 @@ New_Server( INT Server, CONN_ID Idx )
if( ! Init_Socket( new_sock )) return;
- connect( new_sock, (struct sockaddr *)&new_addr, sizeof( new_addr ));
- if( errno != EINPROGRESS )
+ res = connect( new_sock, (struct sockaddr *)&new_addr, sizeof( new_addr ));
+ if(( res != 0 ) && ( errno != EINPROGRESS ))
{
-
+ Log( LOG_CRIT, "Can't connect socket: %s!", strerror( errno ));
close( new_sock );
Init_Conn_Struct( Idx );
- Log( LOG_CRIT, "Can't connect socket: %s!", strerror( errno ));
return;
}
-----END OF PAGE-----