Skip to content
Snippets Groups Projects
Commit 2e5a3f73 authored by David Bigagli's avatar David Bigagli
Browse files

Update the signature of net_set_low_water() from int fo socklen_t.

parent fafe6f6b
No related branches found
No related tags found
No related merge requests found
...@@ -168,7 +168,7 @@ int readn(int fd, void *buf, size_t nbytes) ...@@ -168,7 +168,7 @@ int readn(int fd, void *buf, size_t nbytes)
return(n); return(n);
} }
int net_set_low_water(int sock, int size) int net_set_low_water(int sock, socklen_t size)
{ {
if (setsockopt(sock, SOL_SOCKET, SO_RCVLOWAT, if (setsockopt(sock, SOL_SOCKET, SO_RCVLOWAT,
(const void *) &size, sizeof(size)) < 0) { (const void *) &size, sizeof(size)) < 0) {
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#define _NET_H #define _NET_H
#include <stdint.h> #include <stdint.h>
#include <sys/socket.h>
#include "src/common/macros.h" #include "src/common/macros.h"
...@@ -59,7 +60,7 @@ extern int net_accept_stream(int fd); ...@@ -59,7 +60,7 @@ extern int net_accept_stream(int fd);
/* set low water mark on socket /* set low water mark on socket
*/ */
extern int net_set_low_water(int sock, int size); extern int net_set_low_water(int sock, socklen_t size);
/* set keep alive time on socket */ /* set keep alive time on socket */
extern int net_set_keep_alive(int sock); extern int net_set_keep_alive(int sock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment