diff options
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) | |||
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | 1405 | ||
1406 | #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) | ||
1407 | static void | 1406 | static void |
1408 | packet_set_tos(int interactive) | 1407 | packet_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. */ |