if (switch_queue_trypush(logging->send_queue, msg) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "AMQP logging message queue full. Messages will be dropped!\n");
- return SWITCH_STATUS_SUCCESS;
+ switch_safe_free(hi);
+ goto done;
}
}
}
-
+ done:
switch_safe_free(json);
return SWITCH_STATUS_SUCCESS;
}
top:
- for (hi = switch_core_hash_first(jb->missing_seq_hash); hi; hi = switch_core_hash_next(&hi)) {
+ for (hi = switch_core_hash_first_iter(jb->missing_seq_hash, hi); hi; hi = switch_core_hash_next(&hi)) {
uint16_t seq;
//const char *token;
switch_time_t then = 0;
}
}
+ switch_safe_free(hi);
+
if (least && switch_core_inthash_delete(jb->missing_seq_hash, (uint32_t)htons(least))) {
jb_debug(jb, 3, "Found NACKABLE seq %u\n", least);
nack = (uint32_t) htons(least);