From e808dbe94b06d19104d97ccfe7cbe415a3a35a76 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sun, 21 Sep 2014 14:54:12 +0000 Subject: [PATCH] Change the lag check so that it does not try to format a time_t using %lu. Recent OpenBSD and NetBSD have changed time_t to be a 64 bit type on all platforms. This means that on 32 bit systems, time_t is now longer than long, and %lu can't be used to format it. The lag check doesn't actually care what is in the first field of the PING command, so change it to be our nick (which is arguably what it should be). git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@498 13b04d17-f746-0410-82c6-800466cd88b0 --- Changelog | 2 ++ source/misc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 06770ee..bb91143 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,7 @@ [Changes 1.2c01] +* Fix lag check on recent 32 bit OpenBSD / NetBSD (reported by DJ). (caf) + * Fix key bindings that terminate with ^. (caf) * Fix the $timer() scripting function. (caf) diff --git a/source/misc.c b/source/misc.c index 1c12a15..d776f11 100644 --- a/source/misc.c +++ b/source/misc.c @@ -255,7 +255,7 @@ int check_serverlag(void) if (is_server_connected(i) && now != get_server_lagtime(i)) { set_server_lagtime(i, now); - my_send_to_server(i, "PING %lu %s", get_server_lagtime(i), get_server_itsname(i)); + my_send_to_server(i, "PING %s %s", get_server_nickname(i), get_server_itsname(i)); in_server_ping++; set_server_lag(i, -1); }