| 223 | } |
| 224 | |
| 225 | int ff_accept(int fd, int timeout, URLContext *h) |
| 226 | { |
| 227 | int ret; |
| 228 | struct pollfd lp = { fd, POLLIN, 0 }; |
| 229 | |
| 230 | ret = ff_poll_interrupt(&lp, 1, timeout, &h->interrupt_callback); |
| 231 | if (ret < 0) |
| 232 | return ret; |
| 233 | |
| 234 | ret = accept(fd, NULL, NULL); |
| 235 | if (ret < 0) |
| 236 | return ff_neterrno(); |
| 237 | if (ff_socket_nonblock(ret, 1) < 0) |
| 238 | av_log(h, AV_LOG_DEBUG, "ff_socket_nonblock failed\n"); |
| 239 | |
| 240 | return ret; |
| 241 | } |
| 242 | |
| 243 | int ff_listen_bind(int fd, const struct sockaddr *addr, |
| 244 | socklen_t addrlen, int timeout, URLContext *h) |
no test coverage detected