TT#98901 add ssrc_hash_foreach()

Change-Id: Ia90fc84ee82afc78b8fa5b6f8fed160959636d28
pull/1116/head
Richard Fuchs 5 years ago
parent 054339e0ec
commit 58c436e5a7

@ -178,6 +178,16 @@ void free_ssrc_hash(struct ssrc_hash **ht) {
g_slice_free1(sizeof(**ht), *ht);
*ht = NULL;
}
void ssrc_hash_foreach(struct ssrc_hash *sh, void (*f)(void *)) {
rwlock_lock_w(&sh->lock);
for (GList *k = sh->q.head; k; k = k->next)
f(k->data);
if (sh->precreat)
f(sh->precreat);
rwlock_unlock_w(&sh->lock);
}
struct ssrc_hash *create_ssrc_hash_full(ssrc_create_func_t cfunc, void *uptr) {

@ -183,6 +183,7 @@ struct ssrc_xr_voip_metrics {
void free_ssrc_hash(struct ssrc_hash **);
void ssrc_hash_foreach(struct ssrc_hash *, void (*)(void *));
struct ssrc_hash *create_ssrc_hash_full(ssrc_create_func_t, void *uptr);
struct ssrc_hash *create_ssrc_hash_call(void);

Loading…
Cancel
Save