From: Steinar H. Gunderson Date: Thu, 17 Oct 2013 12:43:34 +0000 (+0200) Subject: When checking to see if we want to warn about pacing rate, use the correct default... X-Git-Tag: 1.0.2~10 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=40eab3b7a07862a5547fc178e1edec22522ed7dc When checking to see if we want to warn about pacing rate, use the correct default (~0U, not 0). --- diff --git a/server.cpp b/server.cpp index 288224c..f508710 100644 --- a/server.cpp +++ b/server.cpp @@ -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)"); } } diff --git a/udpstream.cpp b/udpstream.cpp index 11e1527..5f5d846 100644 --- a/udpstream.cpp +++ b/udpstream.cpp @@ -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)"); } }