Changeset ed9144bac360c3c29d92fe8f6cb8195680fdeb52

Show
Ignore:
Timestamp:
22/12/07 10:10:56 (10 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1198314656 +0000
git-parent:

[f9ff5b64b419eccc3d746aa93ff22d49eef4c3bd]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1198314656 +0000
Message:

Revert [23768] and [23768]. Fix dead lock whenever reading from the network.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/network/io.c

    r4c4ad24 red9144b  
    257257net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv, 
    258258               const v_socket_t *const *restrict vsv, 
    259                uint8_t *restrict p_buf, size_t i_buflen, vlc_bool_t waitall, 
    260                int timeout) 
     259               uint8_t *restrict p_buf, size_t i_buflen, vlc_bool_t waitall) 
    261260{ 
    262261    size_t i_total = 0; 
     
    283282        } 
    284283 
    285         switch (poll (ufd, fdc, timeout ? timeout : 500)) 
     284        switch (poll (ufd, fdc, 500)) 
    286285        { 
    287286            case -1: 
     
    289288 
    290289            case 0: // timeout 
    291                 if( timeout ) return i_total; 
    292290                continue; 
    293291        } 
     
    402400    return net_ReadInner( p_this, 1, &(int){ fd }, 
    403401                          &(const v_socket_t *){ p_vs }, 
    404                           buf, len, b_retry, 0 ); 
     402                          buf, len, b_retry ); 
    405403} 
    406404 
     
    410408 ***************************************************************************** 
    411409 * Read from several sockets. Takes data from the first socket that has some. 
    412  * if timeout is zero, net_Select will wait indefinitely. timeout is in 
    413  * millisecond. 
    414410 *****************************************************************************/ 
    415411ssize_t __net_Select( vlc_object_t *restrict p_this, 
    416412                      const int *restrict fds, int nfd, 
    417                       uint8_t *restrict buf, size_t len, 
    418                       int timeout ) 
     413                      uint8_t *restrict buf, size_t len ) 
    419414{ 
    420415    const v_socket_t *vsv[nfd]; 
     
    422417 
    423418    return net_ReadInner( p_this, nfd, fds, vsv, 
    424                           buf, len, VLC_FALSE, timeout ); 
     419                          buf, len, VLC_FALSE ); 
    425420} 
    426421