about summary refs log tree commit homepage
path: root/bind_listen.c
diff options
context:
space:
mode:
Diffstat (limited to 'bind_listen.c')
-rw-r--r--bind_listen.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/bind_listen.c b/bind_listen.c
index 104f6ee..e1f0168 100644
--- a/bind_listen.c
+++ b/bind_listen.c
@@ -4,18 +4,6 @@
  */
 #include "cmogstored.h"
 
-/* Under FreeBSD, TCP_NOPUSH is inherited by accepted sockets */
-static int tcp_nopush_prepare(int fd)
-{
-        socklen_t len = (socklen_t)sizeof(int);
-        int val = 1;
-
-        if (MOG_TCP_NOPUSH == 0)
-                return 0;
-
-        return setsockopt(fd, IPPROTO_TCP, MOG_TCP_NOPUSH, &val, len);
-}
-
 /*
  * TODO
  * - configurable socket buffer sizes (where to put config?)
@@ -27,7 +15,7 @@ static int tcp_nopush_prepare(int fd)
  *   http://labs.apnic.net/blabs/?p=57
  */
 
-static int set_tcp_opts(int fd, const char *accept_filter)
+static int set_tcp_opts(int fd)
 {
         int val;
         socklen_t len = sizeof(int);
@@ -45,15 +33,10 @@ static int set_tcp_opts(int fd, const char *accept_filter)
         rc = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &val, len);
         if (rc < 0) return rc;
 
-        if (accept_filter) {
-                if (strcmp(accept_filter, "httpready") == 0)
-                        rc = tcp_nopush_prepare(fd);
-        }
-
         return rc;
 }
 
-int mog_bind_listen(struct addrinfo *r, const char *accept_filter)
+int mog_bind_listen(struct addrinfo *r)
 {
         /* see if we inherited the socket, first */
         int fd = mog_inherit_get(r->ai_addr, r->ai_addrlen);
@@ -73,7 +56,7 @@ int mog_bind_listen(struct addrinfo *r, const char *accept_filter)
                  * everywhere yet (in 2012).
                  */
                 if (mog_set_cloexec(fd, true) == 0 &&
-                    set_tcp_opts(fd, accept_filter) == 0 &&
+                    set_tcp_opts(fd) == 0 &&
                     bind(fd, r->ai_addr, r->ai_addrlen) == 0 &&
                     listen(fd, 1024) == 0)
                         break;