Ignore:
Timestamp:
12/29/12 10:03:12 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Moved the storage of the error code to where it belongs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/xplcommon/posix/ReadingBuffer.cc

    r6 r14  
    3434#include "BufferedWaitable.h"
    3535
    36 #include <cerrno>
    37 
    3836#include <poll.h>
    3937
     
    5553    ssize_t result = waitable.read(getData(), getCapacity());
    5654    if (result<0) {
    57         if (errno==EAGAIN || errno==EWOULDBLOCK) {
     55        if (waitable.failed()) {
     56            waitable.events &= ~POLLIN;
     57        } else {
    5858            waitable.events |= POLLIN;
    59         } else {
    60             waitable.events &= ~POLLIN;
    61             setErrorCode(errno);
    6259        }
    6360    } else {
Note: See TracChangeset for help on using the changeset viewer.