Change in osmo-e1d[master]: _e1_line_new(): Initialize timeslot fd to -1

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/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Jun 30 06:02:03 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/19042 )

Change subject: _e1_line_new(): Initialize timeslot fd to -1
......................................................................

_e1_line_new(): Initialize timeslot fd to -1

Otherwise we might up ending up doing plenty of unintended close(0)
in _e1d_ts_stop()

Change-Id: I6b88a3ff7d650a0caa242e6ac60d7778564e237c
---
M src/intf_line.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  tnt: Looks good to me, but someone else must approve



diff --git a/src/intf_line.c b/src/intf_line.c
index f572190..a879922 100644
--- a/src/intf_line.c
+++ b/src/intf_line.c
@@ -78,8 +78,10 @@
 	line->intf = intf;
 	line->drv_data = drv_data;
 
-	for (int i=0; i<32; i++)
+	for (int i=0; i<32; i++) {
 		line->ts[i].id = i;
+		line->ts[i].fd = -1;
+	}
 
 	INIT_LLIST_HEAD(&line->list);
 

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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I6b88a3ff7d650a0caa242e6ac60d7778564e237c
Gerrit-Change-Number: 19042
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Assignee: tnt <tnt at 246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: tnt <tnt at 246tNt.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200630/7c06947e/attachment.htm>


More information about the gerrit-log mailing list