aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_client_core.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-11-08 15:02:38 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-11-09 00:20:29 +0100
commite3d7c3e1545fcba6d14e2daef08da3400a136a32 (patch)
treea0a5dab416ab960f89c9636983817ecd7d10c4f7 /src/osmo_client_core.c
parentbdda28b1f5ca80bba83313fa55eba4f144b9ad3e (diff)
client: Prepare to work with a list of servers
There is no VTY code yet and no servers in the list but it looks good client this. Change-Id: Ic35748f1a95a880a9fa49dd18361592d8ac941ba
Diffstat (limited to 'src/osmo_client_core.c')
-rw-r--r--src/osmo_client_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/osmo_client_core.c b/src/osmo_client_core.c
index 203e6a2..b2010a9 100644
--- a/src/osmo_client_core.c
+++ b/src/osmo_client_core.c
@@ -155,6 +155,7 @@ static int forward_packet(
static int pcap_read_cb(struct osmo_fd *fd, unsigned int what)
{
struct osmo_pcap_client *client = fd->data;
+ struct osmo_pcap_client_conn *conn;
struct pcap_pkthdr hdr;
const u_char *data;
@@ -168,6 +169,8 @@ static int pcap_read_cb(struct osmo_fd *fd, unsigned int what)
return 0;
osmo_client_send_data(&client->conn, &hdr, data);
+ llist_for_each_entry(conn, &client->conns, entry)
+ osmo_client_send_data(conn, &hdr, data);
return 0;
}
@@ -272,6 +275,7 @@ static void free_all(struct osmo_pcap_client *client)
int osmo_client_capture(struct osmo_pcap_client *client, const char *device)
{
+ struct osmo_pcap_client_conn *conn;
int fd;
talloc_free(client->device);
@@ -316,6 +320,8 @@ int osmo_client_capture(struct osmo_pcap_client *client, const char *device)
pcap_check_stats_cb(client);
osmo_client_send_link(&client->conn);
+ llist_for_each_entry(conn, &client->conns, entry)
+ osmo_client_send_link(conn);
if (client->filter_string) {
osmo_install_filter(client);