diff options
| author | Nakidai <nakidai@disroot.org> | 2026-02-01 22:28:31 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2026-02-01 22:28:31 +0300 |
| commit | 58a7e4a4d7449d58732e024ea07ea3623c10d8de (patch) | |
| tree | 932b0402a91f4b513b5ab81a8d53af467a771f86 | |
| parent | 37b3fcd87133cf67a791dd4ec7a185d281331fb2 (diff) | |
| download | libreircd-58a7e4a4d7449d58732e024ea07ea3623c10d8de.tar.gz libreircd-58a7e4a4d7449d58732e024ea07ea3623c10d8de.zip | |
Fixes
- Now code depends on config.h in Makefile - By default the smallest timeout is chosen for poll() - Somewhy there was sizeof(PEER_QUIT_MAX)...
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | config.h | 2 | ||||
| -rw-r--r-- | loop.c | 2 |
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 ); |