gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27780 - libmicrohttpd/src/microspdy


From: gnunet
Subject: [GNUnet-SVN] r27780 - libmicrohttpd/src/microspdy
Date: Sun, 7 Jul 2013 17:48:40 +0200

Author: andreyu
Date: 2013-07-07 17:48:40 +0200 (Sun, 07 Jul 2013)
New Revision: 27780

Modified:
   libmicrohttpd/src/microspdy/io_raw.c
Log:
spdy: disable TCP_CORK when NO DELAY is set

Modified: libmicrohttpd/src/microspdy/io_raw.c
===================================================================
--- libmicrohttpd/src/microspdy/io_raw.c        2013-07-07 14:35:51 UTC (rev 
27779)
+++ libmicrohttpd/src/microspdy/io_raw.c        2013-07-07 15:48:40 UTC (rev 
27780)
@@ -159,13 +159,16 @@
 int
 SPDYF_raw_before_write(struct SPDY_Session *session)
 {
-  int val = 1;
-  int ret;
+  if(0 == (SPDY_DAEMON_FLAG_NO_DELAY & session->daemon->flags))
+  {
+    int val = 1;
+    int ret;
+    
+    ret = setsockopt(session->socket_fd, IPPROTO_TCP, TCP_CORK, &val, 
(socklen_t)sizeof(val));
+    if(-1 == ret)
+      SPDYF_DEBUG("WARNING: Couldn't set the new connection to TCP_CORK");
+  }
   
-  ret = setsockopt(session->socket_fd, IPPROTO_TCP, TCP_CORK, &val, 
(socklen_t)sizeof(val));
-  if(-1 == ret)
-    SPDYF_DEBUG("WARNING: Couldn't set the new connection to TCP_CORK");
-  
        return SPDY_YES;
 }
 
@@ -173,12 +176,15 @@
 int
 SPDYF_raw_after_write(struct SPDY_Session *session, int was_written)
 {
-  int val = 0;
-  int ret;
+  if(0 == (SPDY_DAEMON_FLAG_NO_DELAY & session->daemon->flags))
+  {
+    int val = 0;
+    int ret;
+    
+    ret = setsockopt(session->socket_fd, IPPROTO_TCP, TCP_CORK, &val, 
(socklen_t)sizeof(val));
+    if(-1 == ret)
+      SPDYF_DEBUG("WARNING: Couldn't unset the new connection to TCP_CORK");
+  }
   
-  ret = setsockopt(session->socket_fd, IPPROTO_TCP, TCP_CORK, &val, 
(socklen_t)sizeof(val));
-  if(-1 == ret)
-    SPDYF_DEBUG("WARNING: Couldn't unset the new connection to TCP_CORK");
-  
        return was_written;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]