Changeset 1145

Show
Ignore:
Timestamp:
05/09/08 04:12:05 (16 years ago)
Author:
holin
Message:

error types are returned in errno not the return value

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libieee1394/IsoHandlerManager.cpp

    r1031 r1145  
    316316 
    317317    if(result != 0) { 
    318         if (result == ETIMEDOUT) { 
     318        if (errno == ETIMEDOUT) { 
    319319            debugOutput(DEBUG_LEVEL_VERBOSE, 
    320320                        "(%p) pthread_cond_timedwait() timed out (result=%d)\n", 
    321321                        this, result); 
    322322            return eAR_Timeout; 
    323         } else if (result == EINTR) { 
     323        } else if (errno == EINTR) { 
    324324            debugOutput(DEBUG_LEVEL_VERBOSE, 
    325325                        "(%p) pthread_cond_[timed]wait() interrupted by signal (result=%d)\n", 
     
    327327            return eAR_Interrupted; 
    328328        } else { 
    329             debugError("(%p) pthread_cond_[timed]wait error (result=%d)\n",  
    330                         this, result); 
     329            debugError("(%p) pthread_cond_[timed]wait error (result=%d errno=%d)\n",  
     330                        this, result, errno); 
    331331            debugError("(%p) timeout_sec=%d timeout_nsec=%lld ts.sec=%d ts.nsec=%lld\n",  
    332332                       this, timeout_sec, timeout_nsec, ts.tv_sec, ts.tv_nsec); 
  • trunk/libffado/src/libstreaming/StreamProcessorManager.cpp

    r1099 r1145  
    147147 
    148148    if(result != 0) { 
    149         if (result == ETIMEDOUT) { 
     149        if (errno == ETIMEDOUT) { 
    150150            debugOutput(DEBUG_LEVEL_VERBOSE, 
    151151                        "(%p) sem_timedwait() timed out (result=%d)\n", 
    152152                        this, result); 
    153153            return eAR_Timeout; 
    154         } else if (result == EINTR) { 
     154        } else if (errno == EINTR) { 
    155155            debugOutput(DEBUG_LEVEL_VERBOSE, 
    156156                        "(%p) sem_[timed]wait() interrupted by signal (result=%d)\n", 
     
    158158            return eAR_Interrupted; 
    159159        } else { 
    160             debugError("(%p) sem_[timed]wait error (result=%d)\n",  
    161                         this, result); 
     160            debugError("(%p) sem_[timed]wait error (result=%d errno=%d)\n",  
     161                        this, result, errno); 
    162162            debugError("(%p) timeout_sec=%d timeout_nsec=%lld ts.sec=%d ts.nsec=%lld\n",  
    163163                       this, timeout_sec, timeout_nsec, ts.tv_sec, ts.tv_nsec);