about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2002-01-05 15:56:23 +0000
committerAlexander Barton <alex@barton.de>2002-01-05 15:56:23 +0000
commitbcc0cdc3ab75f3068686fa355f65eccdfff91c99 (patch)
tree39f3bc4b42f3593bcd1e16ea1c939677ecc313e7
parentbb2143aabc12215621e8ba4542553c1b2631b9ea (diff)
downloadngircd-bcc0cdc3ab75f3068686fa355f65eccdfff91c99.tar.gz
ngircd-bcc0cdc3ab75f3068686fa355f65eccdfff91c99.zip
- "arpa/inet.h" wird nur noch includiert, wenn vorhanden.
- Ein Fehler bei select() fuerht nun zum Abbruch von ngIRCd.
- NO_ADDRESS durch NO_DATA ersetzt: ist wohl portabler.
-rw-r--r--src/ngircd/conn.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 8e2455de..2898a988 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -9,11 +9,16 @@
  * 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.29 2002/01/04 01:36:40 alex Exp $
+ * $Id: conn.c,v 1.30 2002/01/05 15:56:23 alex Exp $
  *
  * connect.h: Verwaltung aller Netz-Verbindungen ("connections")
  *
  * $Log: conn.c,v $
+ * Revision 1.30  2002/01/05 15:56:23  alex
+ * - "arpa/inet.h" wird nur noch includiert, wenn vorhanden.
+ * - Ein Fehler bei select() fuerht nun zum Abbruch von ngIRCd.
+ * - NO_ADDRESS durch NO_DATA ersetzt: ist wohl portabler.
+ *
  * Revision 1.29  2002/01/04 01:36:40  alex
  * - Loglevel ein wenig angepasst.
  *
@@ -132,9 +137,14 @@
 #include <sys/types.h>
 #include <time.h>
 #include <netinet/in.h>
-#include <arpa/inet.h>
 #include <netdb.h>
 
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#else
+#define PF_INET AF_INET
+#endif
+
 #ifdef HAVE_STDINT_H
 #include <stdint.h>			/* u.a. fuer Mac OS X */
 #endif
@@ -387,7 +397,8 @@ GLOBAL VOID Conn_Handler( INT Timeout )
 		if( select( My_Max_Fd + 1, &read_sockets, &write_sockets, NULL, &tv ) == -1 )
 		{
 			if( errno != EINTR ) Log( LOG_ALERT, "select(): %s!", strerror( errno ));
-			return;
+			Log( LOG_ALERT, PACKAGE" exiting due to fatal errors!" );
+			exit( 1 );
 		}
 
 		/* Koennen Daten geschrieben werden? */
@@ -1256,7 +1267,7 @@ LOCAL CHAR *Resolv_Error( INT H_Error )
 	{
 		case HOST_NOT_FOUND:
 			return "host not found";
-		case NO_ADDRESS:
+		case NO_DATA:
 			return "name valid but no IP address defined";
 		case NO_RECOVERY:
 			return "name server error";