TT#14008 avoid pointless open/close of kernel list

If there's no calls active then there's no point in checking the kernel
status.

Change-Id: I84418b38f8976c9f4e29ea725e9cd1eab7306298
pull/1439/head
Richard Fuchs 4 years ago
parent 6d85fb6887
commit a684025f07

@ -53,6 +53,7 @@
struct iterator_helper {
uint64_t count;
GSList *del_timeout;
GSList *del_scheduled;
GHashTable *addr_sfd;
@ -153,6 +154,8 @@ static void call_timer_iterator(struct call *c, struct iterator_helper *hlp) {
enum call_stream_state css;
atomic64 *timestamp;
hlp->count++;
rwlock_lock_r(&c->master_lock);
log_info_call(c);
@ -582,7 +585,7 @@ void call_timer(void *ptr) {
// stats derived while iterating calls
RTPE_GAUGE_SET(transcoded_media, hlp.transcoded_media);
i = kernel_list();
i = hlp.count ? kernel_list() : NULL;
while (i) {
ke = i->data;

Loading…
Cancel
Save