Changeset 343

Show
Ignore:
Timestamp:
04/16/08 03:41:45 (7 months ago)
Author:
rm
Message:

abstime isn't in this, #include errno.h, problems found and fixes suggested by Rick R

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thrudoc/src/ReplicationBackend.cpp

    r313 r343  
    99#include "ReplicationBackend.h" 
    1010 
     11#include <errno.h> 
    1112#include <poll.h> 
    1213#include <protocol/TBinaryProtocol.h> 
     
    6869            int err; 
    6970            struct timespec abstime; 
    70             err = clock_gettime(CLOCK_REALTIME, &this->abstime); 
     71            err = clock_gettime(CLOCK_REALTIME, &abstime); 
    7172            if (!err) 
    7273            { 
    73                 this->abstime.tv_sec += this->max_wait; 
     74                abstime.tv_sec += this->max_wait; 
    7475                // cond_timedwait will unlock mutex so release can happen 
    7576                err = pthread_cond_timedwait (&this->condition, &this->mutex,  
    76                                               &this->abstime); 
     77                                              &abstime); 
    7778                // we need to free the mutex back up, cond_timedwait will lock  
    7879                // it before it comes out