summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-11-22 15:02:42 +1100
committerDamien Miller <djm@mindrot.org>2003-11-22 15:02:42 +1100
commit5924ceb22d8eb5e03bad93b7c0b9c6e30ed0814b (patch)
tree1a27ef5b4c3fa43e856d6d9ad462cd4b9ff8c516
parent841b9f1aadbc18ad1e70d592c64e88782426bb53 (diff)
- (djm) [packet.c] Shuffle #ifdef to reduce conditionally compiled code
-rw-r--r--ChangeLog3
-rw-r--r--packet.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ae79cb62..9f4a1f8d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
8 is enabled, rely on SIA to check for locked accounts if enabled. ok djm@ 8 is enabled, rely on SIA to check for locked accounts if enabled. ok djm@
9 - (djm) [scp.c] Rename limitbw -> limit_rate to match upstreamed patch 9 - (djm) [scp.c] Rename limitbw -> limit_rate to match upstreamed patch
10 - (djm) [sftp-int.c] Remove duplicated code from bogus sync 10 - (djm) [sftp-int.c] Remove duplicated code from bogus sync
11 - (djm) [packet.c] Shuffle #ifdef to reduce conditionally compiled code
11 12
1220031121 1320031121
13 - (djm) OpenBSD CVS Sync 14 - (djm) OpenBSD CVS Sync
@@ -1509,4 +1510,4 @@
1509 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1510 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1510 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1511 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1511 1512
1512$Id: ChangeLog,v 1.3124 2003/11/22 03:48:49 djm Exp $ 1513$Id: ChangeLog,v 1.3125 2003/11/22 04:02:42 djm Exp $
diff --git a/packet.c b/packet.c
index 16d5f972c..daae9ffaa 100644
--- a/packet.c
+++ b/packet.c
@@ -1403,10 +1403,10 @@ packet_not_very_much_data_to_write(void)
1403} 1403}
1404 1404
1405 1405
1406#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
1407static void 1406static void
1408packet_set_tos(int interactive) 1407packet_set_tos(int interactive)
1409{ 1408{
1409#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
1410 int tos = interactive ? IPTOS_LOWDELAY : IPTOS_THROUGHPUT; 1410 int tos = interactive ? IPTOS_LOWDELAY : IPTOS_THROUGHPUT;
1411 1411
1412 if (!packet_connection_is_on_socket() || 1412 if (!packet_connection_is_on_socket() ||
@@ -1416,8 +1416,8 @@ packet_set_tos(int interactive)
1416 sizeof(tos)) < 0) 1416 sizeof(tos)) < 0)
1417 error("setsockopt IP_TOS %d: %.100s:", 1417 error("setsockopt IP_TOS %d: %.100s:",
1418 tos, strerror(errno)); 1418 tos, strerror(errno));
1419}
1420#endif 1419#endif
1420}
1421 1421
1422/* Informs that the current session is interactive. Sets IP flags for that. */ 1422/* Informs that the current session is interactive. Sets IP flags for that. */
1423 1423
@@ -1438,10 +1438,7 @@ packet_set_interactive(int interactive)
1438 return; 1438 return;
1439 if (interactive) 1439 if (interactive)
1440 set_nodelay(connection_in); 1440 set_nodelay(connection_in);
1441#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
1442 packet_set_tos(interactive); 1441 packet_set_tos(interactive);
1443#endif
1444
1445} 1442}
1446 1443
1447/* Returns true if the current connection is interactive. */ 1444/* Returns true if the current connection is interactive. */