Skip to content

Commit f6df97d

Browse files
authored
solve sendmsg: invalid args, by changing pkt->header[] from char to unsigned char (#248)
1 parent a28d244 commit f6df97d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/udx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ struct udx_packet_s {
340340
int dest_len;
341341

342342
// just alloc it in place here, easier to manage
343-
char header[UDX_HEADER_SIZE];
344-
unsigned short nbufs;
343+
uint8_t header[UDX_HEADER_SIZE];
344+
uint16_t nbufs;
345345
};
346346

347347
struct udx_socket_send_s {

src/udx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ send_packet (udx_socket_t *socket, udx_packet_t *pkt) {
14881488
uv_buf_t _bufs[UDX_MAX_COMBINED_WRITES + 2];
14891489

14901490
if (pkt->is_mtu_probe) {
1491-
int padding_size = pkt->header[3];
1491+
size_t padding_size = pkt->header[3];
14921492
static char probe_data[256] = {0};
14931493
_bufs[0] = bufs[0];
14941494
_bufs[1].base = probe_data;

0 commit comments

Comments
 (0)