fr_network_t *nr;
if (track->do_not_respond) {
- DEBUG("Ignoring retransmit from client %s - we are not responding to this request ", client->radclient->shortname);
+ DEBUG("Ignoring retransmit from client %s - we are not responding to this request", client->radclient->shortname);
return 0;
}
fr_assert(inst->cleanup_delay > 0);
fr_assert(track->do_not_respond || track->reply_len);
+ track->expires = fr_time() + inst->cleanup_delay;
+
/*
* if the timer succeeds, then "track"
* will be cleaned up when the timer
* fires.
*/
- if (fr_event_timer_in(track, el, &track->ev,
- inst->cleanup_delay, packet_expiry_timer, track) == 0) {
+ if (fr_event_timer_at(track, el, &track->ev,
+ track->expires, packet_expiry_timer, track) == 0) {
+ DEBUG("proto_%s - cleaning up request in %d.%06ds", inst->app_io->name,
+ (int) (inst->cleanup_delay / NSEC), (int) (inst->cleanup_delay % NSEC));
return;
}
typedef struct {
fr_event_timer_t const *ev; //!< when we clean up this tracking entry
fr_time_t timestamp; //!< when this packet was received
+ fr_time_t expires; //!< when this packet expires
int packets; //!< number of packets using this entry
uint8_t *reply; //!< reply packet (if any)
size_t reply_len; //!< length of reply, or 1 for "do not reply"