Revision c24a4034 ffserver.c

View differences:

ffserver.c
692 692
           second to handle timeouts */
693 693
        do {
694 694
            ret = poll(poll_table, poll_entry - poll_table, delay);
695
            if (ret < 0 && ff_neterrno() != FF_NETERROR(EAGAIN) &&
696
                ff_neterrno() != FF_NETERROR(EINTR))
695
            if (ret < 0 && ff_neterrno() != AVERROR(EAGAIN) &&
696
                ff_neterrno() != AVERROR(EINTR))
697 697
                return -1;
698 698
        } while (ret < 0);
699 699

  
......
916 916
    read_loop:
917 917
        len = recv(c->fd, c->buffer_ptr, 1, 0);
918 918
        if (len < 0) {
919
            if (ff_neterrno() != FF_NETERROR(EAGAIN) &&
920
                ff_neterrno() != FF_NETERROR(EINTR))
919
            if (ff_neterrno() != AVERROR(EAGAIN) &&
920
                ff_neterrno() != AVERROR(EINTR))
921 921
                return -1;
922 922
        } else if (len == 0) {
923 923
            return -1;
......
952 952
            return 0;
953 953
        len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0);
954 954
        if (len < 0) {
955
            if (ff_neterrno() != FF_NETERROR(EAGAIN) &&
956
                ff_neterrno() != FF_NETERROR(EINTR)) {
955
            if (ff_neterrno() != AVERROR(EAGAIN) &&
956
                ff_neterrno() != AVERROR(EINTR)) {
957 957
                /* error : close connection */
958 958
                av_freep(&c->pb_buffer);
959 959
                return -1;
......
1022 1022
            return 0;
1023 1023
        len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0);
1024 1024
        if (len < 0) {
1025
            if (ff_neterrno() != FF_NETERROR(EAGAIN) &&
1026
                ff_neterrno() != FF_NETERROR(EINTR)) {
1025
            if (ff_neterrno() != AVERROR(EAGAIN) &&
1026
                ff_neterrno() != AVERROR(EINTR)) {
1027 1027
                /* error : close connection */
1028 1028
                av_freep(&c->pb_buffer);
1029 1029
                return -1;
......
1049 1049
        len = send(c->fd, c->packet_buffer_ptr,
1050 1050
                    c->packet_buffer_end - c->packet_buffer_ptr, 0);
1051 1051
        if (len < 0) {
1052
            if (ff_neterrno() != FF_NETERROR(EAGAIN) &&
1053
                ff_neterrno() != FF_NETERROR(EINTR)) {
1052
            if (ff_neterrno() != AVERROR(EAGAIN) &&
1053
                ff_neterrno() != AVERROR(EINTR)) {
1054 1054
                /* error : close connection */
1055 1055
                av_freep(&c->packet_buffer);
1056 1056
                return -1;
......
2550 2550
                /* TCP data output */
2551 2551
                len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0);
2552 2552
                if (len < 0) {
2553
                    if (ff_neterrno() != FF_NETERROR(EAGAIN) &&
2554
                        ff_neterrno() != FF_NETERROR(EINTR))
2553
                    if (ff_neterrno() != AVERROR(EAGAIN) &&
2554
                        ff_neterrno() != AVERROR(EINTR))
2555 2555
                        /* error : close connection */
2556 2556
                        return -1;
2557 2557
                    else
......
2624 2624
        len = recv(c->fd, c->buffer_ptr, 1, 0);
2625 2625

  
2626 2626
        if (len < 0) {
2627
            if (ff_neterrno() != FF_NETERROR(EAGAIN) &&
2628
                ff_neterrno() != FF_NETERROR(EINTR))
2627
            if (ff_neterrno() != AVERROR(EAGAIN) &&
2628
                ff_neterrno() != AVERROR(EINTR))
2629 2629
                /* error : close connection */
2630 2630
                goto fail;
2631 2631
            return 0;
......
2651 2651
        len = recv(c->fd, c->buffer_ptr,
2652 2652
                   FFMIN(c->chunk_size, c->buffer_end - c->buffer_ptr), 0);
2653 2653
        if (len < 0) {
2654
            if (ff_neterrno() != FF_NETERROR(EAGAIN) &&
2655
                ff_neterrno() != FF_NETERROR(EINTR))
2654
            if (ff_neterrno() != AVERROR(EAGAIN) &&
2655
                ff_neterrno() != AVERROR(EINTR))
2656 2656
                /* error : close connection */
2657 2657
                goto fail;
2658 2658
        } else if (len == 0)

Also available in: Unified diff