<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/16393">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">e1_input.c: make reference counting get() / put() more verbose<br><br>Change-Id: I1c730d6d146b365712b28e3d37e038344ea850bc<br>---<br>M src/e1_input.c<br>1 file changed, 9 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/93/16393/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/e1_input.c b/src/e1_input.c</span><br><span>index 4717830..eb973ef 100644</span><br><span>--- a/src/e1_input.c</span><br><span>+++ b/src/e1_input.c</span><br><span>@@ -419,12 +419,19 @@</span><br><span> </span><br><span> void e1inp_line_get(struct e1inp_line *line)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- line->refcnt++;</span><br><span style="color: hsl(120, 100%, 40%);">+    int old_refcnt = line->refcnt++;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ LOGP(DLINP, LOGL_DEBUG, "Line '%s' (%p) reference count get: %d -> %d\n",</span><br><span style="color: hsl(120, 100%, 40%);">+             line->name, line, old_refcnt, line->refcnt);</span><br><span> }</span><br><span> </span><br><span> void e1inp_line_put(struct e1inp_line *line)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-   line->refcnt--;</span><br><span style="color: hsl(120, 100%, 40%);">+    int old_refcnt = line->refcnt--;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ LOGP(DLINP, LOGL_DEBUG, "Line '%s' (%p) reference count put: %d -> %d\n",</span><br><span style="color: hsl(120, 100%, 40%);">+             line->name, line, old_refcnt, line->refcnt);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    if (line->refcnt == 0) {</span><br><span>          /* Remove our counter group from libosmocore's global counter</span><br><span>             * list if we are freeing the last remaining talloc context.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-abis/+/16393">change 16393</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmo-abis/+/16393"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-abis </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1c730d6d146b365712b28e3d37e038344ea850bc </div>
<div style="display:none"> Gerrit-Change-Number: 16393 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>