Navigation


Changes in / [1103:d8591b1c56cd:1104:757df62cadb6] in freeDiameter


Ignore:
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/p_psm.c

    r1103 r1104  
    336336                peer->p_psm_timer.tv_sec += random() % 4;
    337337                peer->p_psm_timer.tv_nsec+= random() % 1000000000L;
    338                 if (peer->p_psm_timer.tv_nsec > 1000000000L) {
     338                if (peer->p_psm_timer.tv_nsec >= 1000000000L) {
    339339                        peer->p_psm_timer.tv_nsec -= 1000000000L;
    340340                        peer->p_psm_timer.tv_sec ++;
  • libfdproto/fifo.c

    r1103 r1104  
    579579static int fifo_tget ( struct fifo * queue, void ** item, int istimed, const struct timespec *abstime)
    580580{
    581         int timedout = 0;
    582581        int call_cb = 0;
     582        int ret = 0;
    583583       
    584584        /* Check the parameters */
     
    605605                call_cb = test_l_cb(queue);
    606606        } else {
    607                 int ret = 0;
    608607                /* We have to wait for a new item */
    609608                queue->thrs++ ;
     
    619618                        goto awaken;  /* test for spurious wake-ups */
    620619               
    621                 if (istimed && (ret == ETIMEDOUT)) {
    622                         timedout = 1;
    623                 } else {
    624                         /* Unexpected error condition (means we need to debug) */
    625                         ASSERT( ret == 0 /* never true */ );
    626                 }
     620                /* otherwise (ETIMEDOUT / other error) just continue */
    627621        }
    628622       
     
    635629       
    636630        /* Done */
    637         return timedout ? ETIMEDOUT : 0;
     631        return ret;
    638632}
    639633
Note: See TracChangeset for help on using the changeset viewer.