From a52b55fef9283685ab315a4c9740ce4a434e384d Mon Sep 17 00:00:00 2001 From: Vysheng Date: Thu, 30 Jan 2014 15:45:01 +0400 Subject: [PATCH] mtproto-client: do not use TCPQUICKACK in cygwin --- mtproto-client.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mtproto-client.c b/mtproto-client.c index dc2d22d..97ea4fa 100644 --- a/mtproto-client.c +++ b/mtproto-client.c @@ -1711,7 +1711,7 @@ int rpc_execute (struct connection *c, int op, int len) { logprintf ( "have %d Response bytes\n", Response_len); } -#if !defined(__MACH__) && !defined(__FreeBSD__) +#if !defined(__MACH__) && !defined(__FreeBSD__) && !defined (__CYGWIN__) setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4); #endif int o = c_state; @@ -1719,19 +1719,19 @@ int rpc_execute (struct connection *c, int op, int len) { switch (o) { case st_reqpq_sent: process_respq_answer (c, Response/* + 8*/, Response_len/* - 12*/); -#if !defined(__MACH__) && !defined(__FreeBSD__) +#if !defined(__MACH__) && !defined(__FreeBSD__) && !defined (__CYGWIN__) setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4); #endif return 0; case st_reqdh_sent: process_dh_answer (c, Response/* + 8*/, Response_len/* - 12*/); -#if !defined(__MACH__) && !defined(__FreeBSD__) +#if !defined(__MACH__) && !defined(__FreeBSD__) && !defined (__CYGWIN__) setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4); #endif return 0; case st_client_dh_sent: process_auth_complete (c, Response/* + 8*/, Response_len/* - 12*/); -#if !defined(__MACH__) && !defined(__FreeBSD__) +#if !defined(__MACH__) && !defined(__FreeBSD__) && !defined (__CYGWIN__) setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4); #endif return 0; @@ -1741,7 +1741,7 @@ int rpc_execute (struct connection *c, int op, int len) { } else { process_rpc_message (c, (void *)(Response/* + 8*/), Response_len/* - 12*/); } -#if !defined(__MACH__) && !defined(__FreeBSD__) +#if !defined(__MACH__) && !defined(__FreeBSD__) && !defined (__CYGWIN__) setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4); #endif return 0; @@ -1769,7 +1769,7 @@ int tc_becomes_ready (struct connection *c) { assert (write_out (c, &byte, 1) == 1); flush_out (c); -#if !defined(__MACH__) && !defined(__FreeBSD__) +#if !defined(__MACH__) && !defined(__FreeBSD__) && !defined (__CYGWIN__) setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4); #endif int o = c_state;