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
Mon Jun 29 12:11:12 UTC 2020


laforge has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/42/19042/1

diff --git a/src/intf_line.c b/src/intf_line.c
index 83e629f..27fc5db 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: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200629/c2f00a9b/attachment.htm>


More information about the gerrit-log mailing list