Navigation


Changeset 1108:7ee7b95701c9 in freeDiameter for extensions


Ignore:
Timestamp:
May 13, 2013, 10:46:39 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Change the rt_busy parameter to milliseconds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rt_busypeers/rtbusy.c

    r1047 r1108  
    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, .tv_nsec=0 };
     109                        struct timespec tm = { .tv_sec = rtbusy_conf.RelayTimeout/1000, .tv_nsec=1000000LL * (rtbusy_conf.RelayTimeout % 1000) };
    110110                        CHECK_FCT( fd_msg_send_timeout( pmsg, NULL, NULL, rtbusy_expirecb, &tm ) );
    111111                } else {
     
    118118                        CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, pmsg, MSGFL_ANSW_ERROR ) );
    119119                       
    120                         CHECK_FCT( fd_msg_rescode_set(*pmsg, "DIAMETER_TOO_BUSY", "[rt_busypeers] Timeout reached while waiting for an anwer", NULL, 1 ) );
     120                        CHECK_FCT( fd_msg_rescode_set(*pmsg, "DIAMETER_TOO_BUSY", "[rt_busypeers] Timeout reached while waiting for an answer", NULL, 1 ) );
    121121               
    122122                        CHECK_FCT( fd_msg_send(pmsg, NULL, NULL) );
     
    149149        /* If the message is a request, we only associate the timeout */
    150150        if (hdr->msg_flags & CMD_FLAG_REQUEST) {
    151                 struct timespec tm = { .tv_sec = rtbusy_conf.RelayTimeout, .tv_nsec=0 };
     151                struct timespec tm = { .tv_sec = rtbusy_conf.RelayTimeout/1000, .tv_nsec=1000000LL * (rtbusy_conf.RelayTimeout % 1000) };
    152152                CHECK_FCT( fd_msg_anscb_associate( *pmsg, NULL, NULL, rtbusy_expirecb, &tm ) );
    153153                return 0;
Note: See TracChangeset for help on using the changeset viewer.