Change in libosmocore[master]: ctrl_connection: Initialize write_queue.bfd.fd to -1 during allocation

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
Fri Jan 29 11:21:09 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22462 )

Change subject: ctrl_connection: Initialize write_queue.bfd.fd to -1 during allocation
......................................................................

ctrl_connection: Initialize write_queue.bfd.fd to -1 during allocation

Otherwise fd is set to 0 by default, let's avoid accidentally closing
it if something goes wrong.

Change-Id: I98f744d2880fbb883719cdf1d3eb31f2b22a13b6
---
M src/ctrl/control_if.c
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 9e3e3a9..5eb81c7 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -514,6 +514,7 @@
 	INIT_LLIST_HEAD(&ccon->def_cmds);
 
 	ccon->write_queue.bfd.data = data;
+	ccon->write_queue.bfd.fd = -1;
 	ccon->write_queue.write_cb = control_write_cb;
 	ccon->write_queue.read_cb = handle_control_read;
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I98f744d2880fbb883719cdf1d3eb31f2b22a13b6
Gerrit-Change-Number: 22462
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210129/6e7657a7/attachment.htm>


More information about the gerrit-log mailing list