mirror of https://gerrit.osmocom.org/libosmocore
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
This commit is contained in:
parent
9043205cd9
commit
377645d600
|
@ -514,6 +514,7 @@ struct ctrl_connection *osmo_ctrl_conn_alloc(void *ctx, void *data)
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue