about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2002-02-23 00:03:54 +0000
committerAlexander Barton <alex@barton.de>2002-02-23 00:03:54 +0000
commit8465653c6efa9ce0a976f0a6c8fd63a3ab3b2bd1 (patch)
tree5a69df6880c9ff12b3f2bb7a270b28c8c5114d48 /src
parent2a69ee905aaa8ad3f0c5aa3d50fd7c16791fd0f5 (diff)
downloadngircd-8465653c6efa9ce0a976f0a6c8fd63a3ab3b2bd1.tar.gz
ngircd-8465653c6efa9ce0a976f0a6c8fd63a3ab3b2bd1.zip
- Ergebnistyp von Conn_GetIdle() und Conn_LastPing() auf "time_t" geaendert.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conn.c9
-rw-r--r--src/ngircd/conn.h12
-rw-r--r--src/ngircd/irc.c7
3 files changed, 20 insertions, 8 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index df12bb29..98d211d8 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -9,11 +9,14 @@
  * 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.38 2002/02/19 20:34:31 alex Exp $
+ * $Id: conn.c,v 1.39 2002/02/23 00:03:54 alex Exp $
  *
  * connect.h: Verwaltung aller Netz-Verbindungen ("connections")
  *
  * $Log: conn.c,v $
+ * Revision 1.39  2002/02/23 00:03:54  alex
+ * - Ergebnistyp von Conn_GetIdle() und Conn_LastPing() auf "time_t" geaendert.
+ *
  * Revision 1.38  2002/02/19 20:34:31  alex
  * - Bei ausgehenden Verbindungen wird der Ziel-Port ins Log geschrieben.
  *
@@ -570,7 +573,7 @@ GLOBAL VOID Conn_UpdateIdle( CONN_ID Idx )
 }
 
 
-GLOBAL INT32 Conn_GetIdle( CONN_ID Idx )
+GLOBAL time_t Conn_GetIdle( CONN_ID Idx )
 {
 	/* Idle-Time einer Verbindung liefern (in Sekunden) */
 
@@ -579,7 +582,7 @@ GLOBAL INT32 Conn_GetIdle( CONN_ID Idx )
 } /* Conn_GetIdle */
 
 
-GLOBAL INT32 Conn_LastPing( CONN_ID Idx )
+GLOBAL time_t Conn_LastPing( CONN_ID Idx )
 {
 	/* Zeitpunkt des letzten PING liefern */
 
diff --git a/src/ngircd/conn.h b/src/ngircd/conn.h
index 2c317ef9..3facb922 100644
--- a/src/ngircd/conn.h
+++ b/src/ngircd/conn.h
@@ -9,11 +9,14 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: conn.h,v 1.11 2002/02/11 01:00:50 alex Exp $
+ * $Id: conn.h,v 1.12 2002/02/23 00:03:54 alex Exp $
  *
  * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header)
  *
  * $Log: conn.h,v $
+ * Revision 1.12  2002/02/23 00:03:54  alex
+ * - Ergebnistyp von Conn_GetIdle() und Conn_LastPing() auf "time_t" geaendert.
+ *
  * Revision 1.11  2002/02/11 01:00:50  alex
  * - neue Funktion Conn_LastPing().
  *
@@ -55,6 +58,9 @@
 #define __conn_h__
 
 
+#include <time.h>
+
+
 typedef INT CONN_ID;
 
 typedef struct _Res_Stat
@@ -77,8 +83,8 @@ GLOBAL BOOLEAN Conn_WriteStr( CONN_ID Idx, CHAR *Format, ... );
 GLOBAL VOID Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient );
 
 GLOBAL VOID Conn_UpdateIdle( CONN_ID Idx );
-GLOBAL INT32 Conn_GetIdle( CONN_ID Idx );
-GLOBAL INT32 Conn_LastPing( CONN_ID Idx );
+GLOBAL time_t Conn_GetIdle( CONN_ID Idx );
+GLOBAL time_t Conn_LastPing( CONN_ID Idx );
 
 
 #endif
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index 72d5b029..5bfee00f 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -9,11 +9,14 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc.c,v 1.64 2002/02/19 20:06:45 alex Exp $
+ * $Id: irc.c,v 1.65 2002/02/23 00:03:54 alex Exp $
  *
  * irc.c: IRC-Befehle
  *
  * $Log: irc.c,v $
+ * Revision 1.65  2002/02/23 00:03:54  alex
+ * - Ergebnistyp von Conn_GetIdle() und Conn_LastPing() auf "time_t" geaendert.
+ *
  * Revision 1.64  2002/02/19 20:06:45  alex
  * - User-Registrierung wird nicht mehr als Nick-Aenderung protokolliert,
  * - VERSION liefert nun doch wieder den Debug-Status im Reply.
@@ -1115,7 +1118,7 @@ GLOBAL BOOLEAN IRC_PONG( CLIENT *Client, REQUEST *Req )
 	/* Der Connection-Timestamp wurde schon beim Lesen aus dem Socket
 	 * aktualisiert, daher muss das hier nicht mehr gemacht werden. */
 
-	if( Client_Conn( Client ) > NONE ) Log( LOG_DEBUG, "Connection %d: received PONG. Lag: %d seconds.", Client_Conn( Client ), time( NULL ) - Conn_LastPing( Client_Conn( Client )));
+	if( Client_Conn( Client ) > NONE ) Log( LOG_DEBUG, "Connection %d: received PONG. Lag: %ld seconds.", Client_Conn( Client ), time( NULL ) - Conn_LastPing( Client_Conn( Client )));
 	else Log( LOG_DEBUG, "Connection %d: received PONG.", Client_Conn( Client ));
 
 	return CONNECTED;