Navigation


Changeset 1115:a325f95de659 in freeDiameter


Ignore:
Timestamp:
May 13, 2013, 7:58:05 PM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Set absolute timeout in second place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rt_busypeers/rtbusy.c

    r1109 r1115  
    107107                /* Send the query again. We  need to re-associate the expirecb which was cleaned, if it is used */
    108108                if (rtbusy_conf.RelayTimeout) {
    109                         struct timespec tm = { .tv_sec = rtbusy_conf.RelayTimeout/1000, .tv_nsec=1000000LL * (rtbusy_conf.RelayTimeout % 1000) };
    110                         CHECK_FCT( fd_msg_send_timeout( pmsg, NULL, NULL, rtbusy_expirecb, &tm ) );
     109                        struct timespec expire;
     110                        CHECK_SYS(  clock_gettime(CLOCK_REALTIME, &expire)  );
     111                        expire.tv_sec += rtbusy_conf.RelayTimeout/1000 + ((expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) / 1000000000LL);
     112                        expire.tv_nsec = (expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) % 1000000000LL;
     113                        CHECK_FCT( fd_msg_send_timeout( pmsg, NULL, NULL, rtbusy_expirecb, &expire ) );
    111114                } else {
    112115                        CHECK_FCT( fd_msg_send(pmsg, NULL, NULL) );
Note: See TracChangeset for help on using the changeset viewer.