mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Check return value of listen().
Reviewed by: emax Approved by: re (kensmith)
This commit is contained in:
parent
b979e69bf6
commit
817e1ec901
1 changed files with 2 additions and 1 deletions
|
|
@ -211,7 +211,8 @@ main(int argc, char *argv[])
|
|||
if (bind(acceptsock, (struct sockaddr *)&ma, sizeof(ma)) < 0)
|
||||
err(1, "Could not bind socket -- channel %d in use?",
|
||||
channel);
|
||||
listen(acceptsock, 10);
|
||||
if (listen(acceptsock, 10) != 0)
|
||||
err(1, "Could not listen on socket");
|
||||
|
||||
ss = sdp_open_local(NULL);
|
||||
if (ss == NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue