switch (notify_on) {
case FR_TRUNK_CONN_EVENT_NONE:
- break; /* no reading or writing is available */
+ return;
case FR_TRUNK_CONN_EVENT_READ:
read_fn = fr_trunk_connection_callback_readable;
inst->secret, inst->secretlen, &request->request_pairs);
if (packet_len < 0) {
RPERROR("Failed encoding packet");
- TALLOC_FREE(u->packet);
return -1;
}
u->id = h->id;
h->tconn = tconn;
+ h->tracking[u->id] = treq;
+ h->id++;
+ h->active++;
+
RDEBUG("Sending %s ID %d length %ld over connection %s",
fr_tacacs_packet_codes[u->code], u->id, u->packet_len, h->name);
/*
* Remember that we've encoded this packet.
*/
- h->tracking[u->id] = treq;
- h->id++;
- h->active++;
h->coalesced[queued] = treq;
/*
udp_request_t *u = talloc_get_type_abort(preq, udp_request_t);
#endif
- fr_assert(u->packet && !u->ev); /* Dealt with by request_conn_release */
+ fr_assert(!u->ev); /* Dealt with by request_conn_release */
fr_assert(state != FR_TRUNK_REQUEST_STATE_INIT);