summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authordjm <djm>2003-11-22 04:02:42 +0000
committerdjm <djm>2003-11-22 04:02:42 +0000
commita506bce11ec39aa6ac7cc099d65ecde0b1073bd4 (patch)
tree592931c48933d4b487fc34ad96678c34e279e64d /packet.c
parentb927f007df35bf52e49f06b13bee36376744770a (diff)
downloadopenssh-a506bce11ec39aa6ac7cc099d65ecde0b1073bd4.tar.gz
- (djm) [packet.c] Shuffle #ifdef to reduce conditionally compiled code
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/packet.c b/packet.c
index 16d5f972..daae9ffa 100644
--- a/packet.c
+++ b/packet.c
@@ -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. */