mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-31 00:23:50 +00:00
Fix initialisation of monitor client
This commit is contained in:
parent
3c736b1f6c
commit
7b224d8947
@ -112,7 +112,7 @@ int monitor_client_open(struct monitor_state **res)
|
|||||||
}
|
}
|
||||||
|
|
||||||
*res = (struct monitor_state*)malloc(sizeof(struct monitor_state));
|
*res = (struct monitor_state*)malloc(sizeof(struct monitor_state));
|
||||||
memset(res,sizeof(struct monitor_state),0);
|
memset(*res,sizeof(struct monitor_state),0);
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,6 +273,8 @@ again:
|
|||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (res->bufferBytes >= MONITOR_CLIENT_BUFFER_SIZE)
|
||||||
|
return WHY("Buffer full");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user