Forward port SOCKSENDBUF, SOCKRECVBUF features from 2.10.11.
[ircu2.10.12-pk.git] / ircd / os_bsd.c
index 9a052d2f5ea6092b22fabb75afa0d33c68dc643a..09850d940756bcde784fa2c2af90116a260e2f13 100644 (file)
@@ -209,13 +209,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)