about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2002-03-30 13:37:12 +0000
committerAlexander Barton <alex@barton.de>2002-03-30 13:37:12 +0000
commitbebf0383d020712e7ff9ccb51f06159a5839487b (patch)
treef07c558c39cde498e41be6cc09dc96e1ce536b2e
parent1c99b8377fd7afdac9170440677f6940b0995370 (diff)
downloadngircd-bebf0383d020712e7ff9ccb51f06159a5839487b.tar.gz
ngircd-bebf0383d020712e7ff9ccb51f06159a5839487b.zip
- in das "Error-File" werden wieder "kritische" Meldungen geschrieben.
-rw-r--r--src/ngircd/conn.c6
-rw-r--r--src/ngircd/log.c23
2 files changed, 23 insertions, 6 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 4283c2d3..efc189e7 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.58 2002/03/29 22:54:35 alex Exp $
+ * $Id: conn.c,v 1.59 2002/03/30 13:37:12 alex Exp $
  *
  * connect.h: Verwaltung aller Netz-Verbindungen ("connections")
  */
@@ -557,7 +557,11 @@ LOCAL BOOLEAN Handle_Write( CONN_ID Idx )
 
 		/* Ergebnis des connect() ermitteln */
 		len = sizeof( err );
+#ifdef SO_ERROR
 		res = getsockopt( My_Connections[Idx].sock, SOL_SOCKET, SO_ERROR, &err, &len );
+#else
+		res = err = 0;
+#endif
 		assert( len == sizeof( err ));
 
 		/* Fehler aufgetreten? */
diff --git a/src/ngircd/log.c b/src/ngircd/log.c
index 4cabca7c..8f3074cc 100644
--- a/src/ngircd/log.c
+++ b/src/ngircd/log.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: log.c,v 1.30 2002/03/29 23:58:10 alex Exp $
+ * $Id: log.c,v 1.31 2002/03/30 13:37:12 alex Exp $
  *
  * log.c: Logging-Funktionen
  */
@@ -150,16 +150,29 @@ GLOBAL VOID Log( INT Level, CONST CHAR *Format, ... )
 	vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
 	va_end( ap );
 
-	/* Konsole */
-	if( NGIRCd_NoDaemon ) printf( "[%d] %s\n", Level, msg );
+	if( NGIRCd_NoDaemon )
+	{
+		/* auf Konsole ausgeben */
+		printf( "[%d] %s\n", Level, msg );
+	}
+
+	if( Level <= LOG_CRIT )
+	{
+		/* Kritische Meldungen in Error-File (stderr) */
+		fprintf( stderr, "%s\n", msg );
+		fflush( stderr );
+	}
 
 #ifdef USE_SYSLOG
 	/* Syslog */
 	syslog( Level, msg );
 #endif
 
-	/* lokale User mit "s"-Mode */
-	if( snotice ) Wall_ServerNotice( msg );
+	if( snotice )
+	{
+		/* NOTICE an lokale User mit "s"-Mode */
+		Wall_ServerNotice( msg );
+	}
 } /* Log */