laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/16393 )
Change subject: e1_input.c: make reference counting get() / put() more verbose ...................................................................... e1_input.c: make reference counting get() / put() more verbose Change-Id: I1c730d6d146b365712b28e3d37e038344ea850bc --- M src/e1_input.c 1 file changed, 9 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/e1_input.c b/src/e1_input.c index 4717830..eb973ef 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -419,12 +419,19 @@ void e1inp_line_get(struct e1inp_line *line) { - line->refcnt++; + int old_refcnt = line->refcnt++; + + LOGP(DLINP, LOGL_DEBUG, "Line '%s' (%p) reference count get: %d -> %d\n", + line->name, line, old_refcnt, line->refcnt); } void e1inp_line_put(struct e1inp_line *line) { - line->refcnt--; + int old_refcnt = line->refcnt--; + + LOGP(DLINP, LOGL_DEBUG, "Line '%s' (%p) reference count put: %d -> %d\n", + line->name, line, old_refcnt, line->refcnt); + if (line->refcnt == 0) { /* Remove our counter group from libosmocore's global counter * list if we are freeing the last remaining talloc context. -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/16393 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I1c730d6d146b365712b28e3d37e038344ea850bc Gerrit-Change-Number: 16393 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilira...@gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-MessageType: merged