commit cd2e105ef46b750f960bb0a752453d77e580edf3
parent 88d9a9eeabde840bd47b76aa0ede5e6a006a64c3
Author: finwo <finwo@pm.me>
Date: Sat, 3 Jan 2026 19:39:05 +0100
2.77
Diffstat:
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,6 @@
+2.77 [KK 2012-02-16]
+- gc++ 4.6 portability issues
+
2.76 [KK 2011-05-24]
- Round-robin dispatching takes weights into acocunt. By request of
and suggested by David T.
diff --git a/Makefile b/Makefile
@@ -1,7 +1,7 @@
# Top-level Makefile for XR
# -------------------------
-VER ?= 2.76
+VER ?= 2.77
PREFIX ?= $(DESTDIR)/usr
BINDIR ?= $(PREFIX)/sbin
MANDIR ?= $(PREFIX)/share/man
diff --git a/xr/Dispatchers/dispatcher/checkdos.cc b/xr/Dispatchers/dispatcher/checkdos.cc
@@ -36,10 +36,10 @@ bool Dispatcher::check_dos() {
(config.softmaxconnrate() && config.defertime()))) {
// The map lookup/insert key.
+ struct sockaddr_in sa = clientfd().clientaddr();
long key;
memset(&key, 0, sizeof(key));
- memcpy(&key, &(clientfd().clientaddr().sin_addr),
- sizeof(clientfd().clientaddr().sin_addr));
+ memcpy(&key, &(sa.sin_addr), sizeof(sa.sin_addr));
time_t now, min_ts;
now = time(0);
diff --git a/xr/netbuffer/netread.cc b/xr/netbuffer/netread.cc
@@ -4,15 +4,9 @@
unsigned Netbuffer::netread (Socket &s, unsigned timeout) {
PROFILE("Netbuffer::netread");
-// cout << "Netbuffer::netread: socket " << s.fd() << ", timeout "
-// << timeout << '\n';
-
- double usec = 0;
-
if (timeout) {
Fdset set(timeout);
set.add(s);
- usec = set.wait_r();
if (! set.readable(s)) {
msg("Fd "<< s.fd() << " failed to become readable within " <<
timeout << " sec\n");
@@ -20,8 +14,6 @@ unsigned Netbuffer::netread (Socket &s, unsigned timeout) {
}
}
- // cout << "fd " << s.fd() << " readable after " << usec << "usec\n";
-
check_space(config.buffersize());
// Read from the network. If this fails, don't throw an exception
@@ -43,7 +35,5 @@ unsigned Netbuffer::netread (Socket &s, unsigned timeout) {
debugmsg (o.str());
}
- // cout << "Fetched " << nread << " bytes\n";
-
return nread;
}