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
This commit is contained in:
Kevin Easton
2014-09-21 14:54:12 +00:00
parent 72a20a8b82
commit e808dbe94b
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2c01] [Changes 1.2c01]
* Fix lag check on recent 32 bit OpenBSD / NetBSD (reported by DJ). (caf)
* Fix key bindings that terminate with ^. (caf) * Fix key bindings that terminate with ^. (caf)
* Fix the $timer() scripting function. (caf) * Fix the $timer() scripting function. (caf)

View File

@@ -255,7 +255,7 @@ int check_serverlag(void)
if (is_server_connected(i) && now != get_server_lagtime(i)) if (is_server_connected(i) && now != get_server_lagtime(i))
{ {
set_server_lagtime(i, now); 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++; in_server_ping++;
set_server_lag(i, -1); set_server_lag(i, -1);
} }