diff options
author | Damien Miller <djm@mindrot.org> | 2003-11-22 15:02:42 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-11-22 15:02:42 +1100 |
commit | 5924ceb22d8eb5e03bad93b7c0b9c6e30ed0814b (patch) | |
tree | 1a27ef5b4c3fa43e856d6d9ad462cd4b9ff8c516 /packet.c | |
parent | 841b9f1aadbc18ad1e70d592c64e88782426bb53 (diff) |
- (djm) [packet.c] Shuffle #ifdef to reduce conditionally compiled code
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1403,10 +1403,10 @@ packet_not_very_much_data_to_write(void) } -#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) static void packet_set_tos(int interactive) { +#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) int tos = interactive ? IPTOS_LOWDELAY : IPTOS_THROUGHPUT; if (!packet_connection_is_on_socket() || @@ -1416,8 +1416,8 @@ packet_set_tos(int interactive) sizeof(tos)) < 0) error("setsockopt IP_TOS %d: %.100s:", tos, strerror(errno)); -} #endif +} /* Informs that the current session is interactive. Sets IP flags for that. */ @@ -1438,10 +1438,7 @@ packet_set_interactive(int interactive) return; if (interactive) set_nodelay(connection_in); -#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) packet_set_tos(interactive); -#endif - } /* Returns true if the current connection is interactive. */ |