Navigation


Changeset 1229:4e52f009861a in freeDiameter for libfdproto


Ignore:
Timestamp:
Jul 18, 2013, 11:08:54 PM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Fix setting of answer and expiry callbacks.

This corrects the interaction between rt_redirect and rt_busypeers,
where you could end up with a timeout and no expiry callback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/messages.c

    r1212 r1229  
    12551255       
    12561256        /* Associate callback and data with the message, if any */
    1257         msg->msg_cb.anscb = anscb;
    1258         msg->msg_cb.expirecb = expirecb;
    1259         msg->msg_cb.data = data;
    1260         if (timeout) {
    1261                 memcpy(&msg->msg_cb.timeout, timeout, sizeof(struct timespec));
     1257        if (anscb) {
     1258                msg->msg_cb.anscb = anscb;
     1259                msg->msg_cb.data = data;
     1260        }
     1261        if (expirecb) {
     1262                msg->msg_cb.expirecb = expirecb;
     1263                if (timeout) {
     1264                        memcpy(&msg->msg_cb.timeout, timeout, sizeof(struct timespec));
     1265                }
    12621266        }
    12631267       
Note: See TracChangeset for help on using the changeset viewer.