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
Wed Jan 27 15:55:26 UTC 2021


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



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/22462/1

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: 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/20210127/08c51af7/attachment.htm>


More information about the gerrit-log mailing list