Changeset e5896809c2ea5686fe1c0831c72b9e8e5a7c1e31

Show
Ignore:
Timestamp:
02/10/08 16:52:00 (7 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1202658720 +0000
git-parent:

[55153f42e23bde1a5e9ca900a93d6adf57178ded]

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

Really (I swear) implement the waitpipe in net_write

Files:

Legend:

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

    r0b28505 re589680  
    285285        if (poll (ufd, sizeof (ufd) / sizeof (ufd[0]), -1) < 0) 
    286286        { 
    287             if (errno =! EINTR) 
     287            if (errno != EINTR) 
    288288                goto error; 
    289289            continue; 
     
    307307            if (ufd[1].revents) 
    308308            { 
     309                assert (p_this->b_die); 
    309310                msg_Dbg (p_this, "socket %d polling interrupted", fd); 
    310311#if defined(WIN32) || defined(UNDER_CE) 
     
    412413            { 
    413414                msg_Err (p_this, "Write error: %m"); 
    414                 goto out
     415                goto error
    415416            } 
    416417            continue; 
     
    424425            if (ufd[1].revents) 
    425426                break; 
     427        } 
     428        else 
     429        { 
     430            if (ufd[1].revents) 
     431            { 
     432                assert (p_this->b_die); 
     433                errno = EINTR; 
     434                goto error; 
     435            } 
    426436        } 
    427437 
     
    446456    } 
    447457 
    448 out: 
    449458    if ((i_total > 0) || (i_data == 0)) 
    450459        return i_total; 
    451460 
     461error: 
    452462    return -1; 
    453463}