diff options
| author | Alexander Barton <alex@barton.de> | 2009-12-31 00:55:42 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2009-12-31 00:57:02 +0100 |
| commit | a4d7c6f14594e1331885ff83afd584f7573c1a6c (patch) | |
| tree | 5160cff919ac9809a9b0c8d12c4007554c09c118 | |
| parent | 1ddc74f13e3feb5be6af4294e1f6a8162edca8a7 (diff) | |
| download | ngircd-a4d7c6f14594e1331885ff83afd584f7573c1a6c.tar.gz ngircd-a4d7c6f14594e1331885ff83afd584f7573c1a6c.zip | |
setsockopt(): use IPPROTO_IP instead of SOL_IP to set IPTOS_LOWDELAY
| -rw-r--r-- | src/ngircd/conn.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index e82b717a..1e4ba0ab 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -1877,12 +1877,13 @@ Init_Socket( int Sock ) } /* Set type of service (TOS) */ -#if defined(IP_TOS) && defined(IPTOS_LOWDELAY) +#if defined(IPPROTO_IP) && defined(IPTOS_LOWDELAY) value = IPTOS_LOWDELAY; - LogDebug("Setting option IP_TOS on socket %d to IPTOS_LOWDELAY (%d).", Sock, value ); - if( setsockopt( Sock, SOL_IP, IP_TOS, &value, (socklen_t)sizeof( value )) != 0 ) - { - Log( LOG_ERR, "Can't set socket option IP_TOS: %s!", strerror( errno )); + LogDebug("Setting IP_TOS on socket %d to IPTOS_LOWDELAY.", Sock); + if (setsockopt(Sock, IPPROTO_IP, IP_TOS, &value, + (socklen_t) sizeof(value))) { + Log(LOG_ERR, "Can't set socket option IP_TOS: %s!", + strerror(errno)); /* ignore this error */ } #endif |