Revision 28c4741a libavformat/tcp.c

View differences:

libavformat/tcp.c
72 72
    ret = connect(fd, cur_ai->ai_addr, cur_ai->ai_addrlen);
73 73
    if (ret < 0) {
74 74
        struct pollfd p = {fd, POLLOUT, 0};
75
        if (ff_neterrno() == FF_NETERROR(EINTR)) {
75
        if (ff_neterrno() == AVERROR(EINTR)) {
76 76
            if (url_interrupt_cb())
77 77
                goto fail1;
78 78
            goto redo;
79 79
        }
80
        if (ff_neterrno() != FF_NETERROR(EINPROGRESS) &&
81
            ff_neterrno() != FF_NETERROR(EAGAIN))
80
        if (ff_neterrno() != AVERROR(EINPROGRESS) &&
81
            ff_neterrno() != AVERROR(EAGAIN))
82 82
            goto fail;
83 83

  
84 84
        /* wait until we are connected or until abort */
......
136 136
    int ret;
137 137

  
138 138
    ret = poll(&p, 1, 100);
139
    return ret < 0 ? ff_neterrno() : p.revents & ev ? 0 : FF_NETERROR(EAGAIN);
139
    return ret < 0 ? ff_neterrno() : p.revents & ev ? 0 : AVERROR(EAGAIN);
140 140
}
141 141

  
142 142
static int tcp_read(URLContext *h, uint8_t *buf, int size)

Also available in: Unified diff