Forward port SOCKSENDBUF, SOCKRECVBUF features from 2.10.11.
[ircu2.10.12-pk.git] / ircd / os_generic.c
index b996ecd66c80ea5b94e483cfac46dbc4742fd18b..2dbde7e727a5124b58c24421423325da583ba403 100644 (file)
@@ -211,13 +211,14 @@ int os_set_reuseaddr(int fd)
                           (const char*) &opt, sizeof(opt)));
 }
 
-int os_set_sockbufs(int fd, unsigned int size)
+int os_set_sockbufs(int fd, unsigned int ssize, unsigned int rsize)
 {
-  unsigned int opt = size;
+  unsigned int sopt = ssize;
+  unsigned int ropt = rsize;
   return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF, 
-                          (const char*) &opt, sizeof(opt)) &&
+                          (const char*) &ropt, sizeof(ropt)) &&
           0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, 
-                          (const char*) &opt, sizeof(opt)));
+                          (const char*) &sopt, sizeof(sopt)));
 }
 
 int os_set_tos(int fd,int tos)