X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fngircd%2Fconn.c;h=d35a091791893ac6eb071c3b9f3a1a326ca69c95;hb=c3dfd63bf3213a5a68d890d3e7cb38fe94a55cb6;hp=fa8b30535622f499d3f218b5f22605dbc6cffd97;hpb=59a0fb8cd999d07ce46b1c5d071d9765af9ddbe8;p=ngircd-alex.git diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index fa8b3053..d35a0917 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -16,7 +16,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: conn.c,v 1.120 2003/03/27 01:20:22 alex Exp $"; +static char UNUSED id[] = "$Id: conn.c,v 1.122 2003/04/21 10:52:26 alex Exp $"; #include "imp.h" #include @@ -429,7 +429,7 @@ Conn_Handler( VOID ) if( errno != EINTR ) { Log( LOG_EMERG, "Conn_Handler(): select(): %s!", strerror( errno )); - Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE ); + Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME ); exit( 1 ); } continue; @@ -626,7 +626,7 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient ) { /* Oops, we can't close the socket!? This is fatal! */ Log( LOG_EMERG, "Error closing connection %d (socket %d) with %s:%d - %s!", Idx, My_Connections[Idx].sock, My_Connections[Idx].host, ntohs( My_Connections[Idx].addr.sin_port), strerror( errno )); - Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE ); + Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME ); exit( 1 ); } @@ -798,6 +798,7 @@ Handle_Write( CONN_ID Idx ) /* Daten aus Schreibpuffer versenden bzw. Connection aufbauen */ INT len, res, err; + socklen_t sock_len; CLIENT *c; assert( Idx > NONE ); @@ -811,9 +812,9 @@ Handle_Write( CONN_ID Idx ) FD_CLR( My_Connections[Idx].sock, &My_Connects ); /* Ergebnis des connect() ermitteln */ - len = sizeof( err ); - res = getsockopt( My_Connections[Idx].sock, SOL_SOCKET, SO_ERROR, &err, &len ); - assert( len == sizeof( err )); + sock_len = sizeof( err ); + res = getsockopt( My_Connections[Idx].sock, SOL_SOCKET, SO_ERROR, &err, &sock_len ); + assert( sock_len == sizeof( err )); /* Fehler aufgetreten? */ if(( res != 0 ) || ( err != 0 )) @@ -901,7 +902,7 @@ New_Connection( INT Sock ) #ifdef USE_TCPWRAP /* Validate socket using TCP Wrappers */ - request_init( &req, RQ_DAEMON, PACKAGE, RQ_FILE, new_sock, RQ_CLIENT_SIN, &new_addr, NULL ); + request_init( &req, RQ_DAEMON, PACKAGE_NAME, RQ_FILE, new_sock, RQ_CLIENT_SIN, &new_addr, NULL ); if( ! hosts_access( &req )) { /* Access denied! */