MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / sh_unref_unsafe

Function sh_unref_unsafe

lib/dbg/struct_hist.c:265–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265static void sh_unref_unsafe(struct struct_hist *sh, osips_free_f free_f)
266{
267 sh->ref--;
268 if (sh->ref != 0)
269 return;
270
271 if (sh->auto_logging) {
272 lock_get(&sh->wlock);
273
274 LM_INFO("%s %p free, %d actions follow\n", sh->obj_name, sh->obj, sh->len);
275 LM_INFO("=====================================\n");
276 _sh_flush(sh, 1);
277
278 lock_release(&sh->wlock);
279 }
280
281 if (!list_empty(&sh->list))
282 list_del(&sh->list);
283
284 sh_free(sh, free_f);
285}
286
287int _sh_log(osips_realloc_f realloc_f, struct struct_hist *sh,
288 enum struct_hist_verb verb, char *fmt, ...)

Callers 2

_sh_pushFunction · 0.85
_sh_unrefFunction · 0.85

Calls 6

lock_getFunction · 0.85
_sh_flushFunction · 0.85
lock_releaseFunction · 0.85
list_emptyFunction · 0.85
list_delFunction · 0.85
sh_freeFunction · 0.85

Tested by

no test coverage detected