pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcap/+/39165?usp=email )
Change subject: pcap-client: Move conns llist initialization to constructor
......................................................................
pcap-client: Move conns llist initialization to constructor
Change-Id: Ib67efa0579755a117c7680f490916e37165204cc
---
M src/osmo_client_core.c
M src/osmo_client_main.c
2 files changed, 3 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
diff --git a/src/osmo_client_core.c b/src/osmo_client_core.c
index 4bb4b4e..11ba7c9 100644
--- a/src/osmo_client_core.c
+++ b/src/osmo_client_core.c
@@ -351,8 +351,11 @@
client = talloc_zero(tall_ctx, struct osmo_pcap_client);
if (!client)
return NULL;
+
client->fd.fd = -1;
client->snaplen = DEFAULT_SNAPLEN;
+ INIT_LLIST_HEAD(&client->conns);
+
return client;
}
diff --git a/src/osmo_client_main.c b/src/osmo_client_main.c
index 818a2f1..c523df3 100644
--- a/src/osmo_client_main.c
+++ b/src/osmo_client_main.c
@@ -262,7 +262,6 @@
}
/* initialize the queue */
- INIT_LLIST_HEAD(&pcap_client->conns);
osmo_client_conn_init(&pcap_client->conn, pcap_client);
pcap_client->conn.name = "default";
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcap/+/39165?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: Ib67efa0579755a117c7680f490916e37165204cc
Gerrit-Change-Number: 39165
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>