When checking to see if we want to warn about pacing rate, use the correct default...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 17 Oct 2013 12:43:34 +0000 (14:43 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 17 Oct 2013 12:43:34 +0000 (14:43 +0200)
server.cpp
udpstream.cpp

index 288224c..f508710 100644 (file)
@@ -538,7 +538,7 @@ int Server::parse_request(Client *client)
                }
        }
        if (setsockopt(client->sock, SOL_SOCKET, SO_MAX_PACING_RATE, &client->stream->pacing_rate, sizeof(client->stream->pacing_rate)) == -1) {
-               if (client->stream->pacing_rate != 0) {
+               if (client->stream->pacing_rate != ~0U) {
                        log_perror("setsockopt(SO_MAX_PACING_RATE)");
                }
        }
index 11e1527..5f5d846 100644 (file)
@@ -32,7 +32,7 @@ UDPStream::UDPStream(const sockaddr_in6 &dst, MarkPool *mark_pool, uint32_t paci
                }
        }
        if (setsockopt(sock, SOL_SOCKET, SO_MAX_PACING_RATE, &pacing_rate, sizeof(pacing_rate)) == -1) {
-               if (pacing_rate != 0) {
+               if (pacing_rate != ~0U) {
                        log_perror("setsockopt(SO_MAX_PACING_RATE)");
                }
        }