pespin submitted this change.

View Change

Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve
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(-)

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 change 39165. To unsubscribe, or for help writing mail filters, visit settings.

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@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>