Skip to content

Commit

Permalink
(Continued)
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Nov 11, 2024
1 parent fd332d0 commit 777f77e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ void *onvif_thread(void) {

while (keepRunning) {
clntsz = sizeof(clntaddr);
if (msglen = recvfrom(servfd, msgbuf, sizeof(msgbuf), 0, (struct sockaddr *)&clntaddr, &clntsz) < 0)
if ((msglen = recvfrom(servfd, msgbuf, sizeof(msgbuf), 0, (struct sockaddr *)&clntaddr, &clntsz)) < 0)
continue;

msgbuf[msglen] = '\0';
#ifdef DEBUG_ONVIF
HAL_INFO("onvif", "Received message: %s\n", msgbuf);
#endif

if (!strstr(msgbuf, "http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe"))
continue;
Expand Down

0 comments on commit 777f77e

Please sign in to comment.