tcp: Check the listen call
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
ae702edf43
commit
a7cc78cb11
@ -90,7 +90,11 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
|
|||||||
ret = ff_neterrno();
|
ret = ff_neterrno();
|
||||||
goto fail1;
|
goto fail1;
|
||||||
}
|
}
|
||||||
listen(fd, 1);
|
ret = listen(fd, 1);
|
||||||
|
if (ret) {
|
||||||
|
ret = ff_neterrno();
|
||||||
|
goto fail1;
|
||||||
|
}
|
||||||
fd1 = accept(fd, NULL, NULL);
|
fd1 = accept(fd, NULL, NULL);
|
||||||
if (fd1 < 0) {
|
if (fd1 < 0) {
|
||||||
ret = ff_neterrno();
|
ret = ff_neterrno();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user