mirror of
https://github.com/Theldus/alertik.git
synced 2024-11-21 23:43:23 +01:00
Bug Fix: Missing clilen initialization
This commit is contained in:
parent
770e95dd04
commit
1bac4dc9a2
3
syslog.c
3
syslog.c
@ -63,11 +63,12 @@ int syslog_create_udp_socket(void)
|
|||||||
/**/
|
/**/
|
||||||
int syslog_enqueue_new_upd_msg(int fd)
|
int syslog_enqueue_new_upd_msg(int fd)
|
||||||
{
|
{
|
||||||
struct sockaddr_storage cli;
|
struct sockaddr_storage cli = {0};
|
||||||
char msg[MSG_MAX] = {0};
|
char msg[MSG_MAX] = {0};
|
||||||
socklen_t clilen;
|
socklen_t clilen;
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
|
||||||
|
clilen = sizeof(cli);
|
||||||
ret = recvfrom(fd, msg, sizeof msg - 1, 0, (struct sockaddr*)&cli,
|
ret = recvfrom(fd, msg, sizeof msg - 1, 0, (struct sockaddr*)&cli,
|
||||||
&clilen);
|
&clilen);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user