summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--config.h2
-rw-r--r--loop.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 49a05b3..e70390f 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ OBJS += user.o
 OBJS += writef.o
 
 all: ${NAME}
-${OBJS}: ircd.h
+${OBJS}: ircd.h config.h
 ${NAME}: ${OBJS}
 	${CC} -o ${NAME} ${CFLAGS} ${LDFLAGS} ${OBJS}
 clean:
diff --git a/config.h b/config.h
index 1f18edd..394ac70 100644
--- a/config.h
+++ b/config.h
@@ -36,4 +36,4 @@
 #define PEER_PINGTIMEOUT 120
 #define PEER_PONGTIMEOUT 20
 
-#define POLL_TIMEOUT PEER_PINGTIMEOUT
+#define POLL_TIMEOUT (PEER_PINGTIMEOUT < PEER_PONGTIMEOUT ? PEER_PINGTIMEOUT : PEER_PONGTIMEOUT)
diff --git a/loop.c b/loop.c
index c568c6f..84195eb 100644
--- a/loop.c
+++ b/loop.c
@@ -133,7 +133,7 @@ loop:
 		{
 			snprintf(
 				peers[i].quit,
-				sizeof(PEER_QUIT_MAX),
+				PEER_QUIT_MAX,
 				"Ping Timeout (%llu seconds)",
 				now - peers[i].ping
 			);