Change in osmo-bts[master]: abis.c: Grab reference to e1inp_line_get if already created

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:46:14 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/18732 )


Change subject: abis.c: Grab reference to e1inp_line_get if already created
......................................................................

abis.c: Grab reference to e1inp_line_get if already created

Since we are returning the pointer, it should always be grabbing a
reference (find doesn't do it).
In practice it's not much important since it is always created and not
found.

Change-Id: Ib84636663be2df33d497131c780b010b57f17e32
---
M src/common/abis.c
1 file changed, 4 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/18732/1

diff --git a/src/common/abis.c b/src/common/abis.c
index 44b8eff..c958070 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -280,8 +280,10 @@
 	bts_dev_info.location2 = model_name;
 
 	line = e1inp_line_find(0);
-	if (!line)
-		line = e1inp_line_create(0, "ipa");
+	if (line)
+		e1inp_line_get(line); /* We want a new reference for returned line*/
+	else
+		line = e1inp_line_create(0, "ipa"); /* already comes with a reference */
 	if (!line)
 		return NULL;
 	e1inp_line_bind_ops(line, &line_ops);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18732
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib84636663be2df33d497131c780b010b57f17e32
Gerrit-Change-Number: 18732
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/c663feda/attachment.htm>


More information about the gerrit-log mailing list