Change in libosmo-abis[master]: e1_input: refcount inc line during e1_sign_link_create, not during li...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Jun 8 18:41:13 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/18730 )


Change subject: e1_input: refcount inc line during e1_sign_link_create, not during line update
......................................................................

e1_input: refcount inc line during e1_sign_link_create, not during line update

Increase reference count when a new sign_link using the line is created.
Otherwise the line is freed too quickly during e1inp_sign_link_destroy()
with several TRX being used, since each RSL link is missing a reference.

That extra refcoutny in update() is not really needed given that we already
have a link assigned on the line when we call update.

Fixes: OS#3612
Fixes: OS#4094

Change-Id: I74405b0e87a89c17d58e87024f4aedbd30832013
---
M src/e1_input.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/30/18730/1

diff --git a/src/e1_input.c b/src/e1_input.c
index 3ab33b8..38fa478 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -578,6 +578,8 @@
 	link->tei = tei;
 	link->sapi = sapi;
 
+	e1inp_line_get(link->ts->line);
+
 	llist_add_tail(&link->list, &ts->sign.sign_links);
 
 	return link;
@@ -847,8 +849,6 @@
 	struct input_signal_data isd;
 	int i, rc;
 
-	e1inp_line_get(line);
-
 	if (line->driver && line->ops && line->driver->line_update) {
 		rc = line->driver->line_update(line);
 	} else

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/18730
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I74405b0e87a89c17d58e87024f4aedbd30832013
Gerrit-Change-Number: 18730
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200608/e8bf6362/attachment.htm>


More information about the gerrit-log mailing list