Skip to content

Commit 3705247

Browse files
committed
Fix debug build error
1 parent 29fd2de commit 3705247

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/websocket/socket/recv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#define MSG_DONTWAIT 0x40
77
#endif
88

9-
static int32_t get_recv_err(ssize_t bytes_read);
9+
static int32_t get_recv_err(const ssize_t bytes_read, const int32_t sock_fd);
1010

1111
ssize_t websocket_recv(const int32_t sock_fd, const size_t capacity, char* restrict buffer)
1212
{
@@ -17,15 +17,15 @@ ssize_t websocket_recv(const int32_t sock_fd, const size_t capacity, char* restr
1717

1818
int32_t errcode;
1919
ssize_t bytes_read = internal_recvfrom(sock_fd, buffer, capacity - 1, MSG_DONTWAIT, NULL, NULL);
20-
if ((errcode = get_recv_err(bytes_read)) != WEBSOCKET_ERRORCODE_NONE) {
20+
if ((errcode = get_recv_err(bytes_read, sock_fd)) != WEBSOCKET_ERRORCODE_NONE) {
2121
return errcode;
2222
}
2323

2424
buffer[bytes_read] = '\0';
2525
return bytes_read;
2626
}
2727

28-
static int32_t get_recv_err(ssize_t bytes_read)
28+
static int32_t get_recv_err(const ssize_t bytes_read, const int32_t sock_fd)
2929
{
3030
if (bytes_read == 0) {
3131
var_info("Socket was disconnected. socket : ", sock_fd);

0 commit comments

Comments
 (0)