mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avformat/network: check the return value from setsockopt()
Fixes: CID1026742 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2fe4b6210c
commit
c8faa47484
@ -220,7 +220,9 @@ int ff_listen_bind(int fd, const struct sockaddr *addr,
|
||||
int ret;
|
||||
int reuse = 1;
|
||||
struct pollfd lp = { fd, POLLIN, 0 };
|
||||
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse))) {
|
||||
av_log(NULL, AV_LOG_WARNING, "setsockopt(SO_REUSEADDR) failed\n");
|
||||
}
|
||||
ret = bind(fd, addr, addrlen);
|
||||
if (ret)
|
||||
return ff_neterrno();
|
||||
|
Loading…
Reference in New Issue
Block a user