Ticket #2044: patch_for_strace_on_streamdump.diff

File patch_for_strace_on_streamdump.diff, 505 bytes (added by oliver@…, 14 years ago)

Added a Label and a goto (sic!) to allow restarting the recv() call

  • stream/network.c

    diff --git a/stream/network.c b/stream/network.c
    index cebb85c..147505c 100644
    a b nop_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t *stream_ctr  
    454454
    455455        if( len<size ) {
    456456                int ret;
     457restart_rcv:
    457458                ret = recv( fd, buffer+len, size-len, 0 );
    458459                if( ret<0 ) {
     460      if( errno == EINTR ) goto restart_rcv;
    459461                        mp_msg(MSGT_NETWORK,MSGL_ERR,"nop_streaming_read error : %s\n",strerror(errno));
    460462                        ret = 0;
    461463                } else if (ret == 0)