diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-11-08 10:33:03 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-11-09 00:20:29 +0100 |
commit | 13f397c68c33cb7296f26a713d629b2d1b8fef08 (patch) | |
tree | dc0c0ef60d11f7fc27f4cf4ea1c2212e551c4fd6 /src/osmo_client_main.c | |
parent | 0381276993737708b061905959ab3e57523631fd (diff) |
client: Prepare to have multiple server connections
Take out various fields into a new connection class. We will have the
option to connect to multiple servers.
Change-Id: I820176d133fbdb0240a16eb4e1a6d505e5c080c6
Diffstat (limited to 'src/osmo_client_main.c')
-rw-r--r-- | src/osmo_client_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/osmo_client_main.c b/src/osmo_client_main.c index 0bbeb7a..694470e 100644 --- a/src/osmo_client_main.c +++ b/src/osmo_client_main.c @@ -218,12 +218,13 @@ int main(int argc, char **argv) exit(1); } pcap_client->fd.fd = -1; - pcap_client->tls_verify = true; + pcap_client->conn.tls_verify = true; vty_client_init(pcap_client); /* initialize the queue */ - osmo_wqueue_init(&pcap_client->wqueue, 10); - pcap_client->wqueue.bfd.fd = -1; + pcap_client->conn.client = pcap_client; + osmo_wqueue_init(&pcap_client->conn.wqueue, 10); + pcap_client->conn.wqueue.bfd.fd = -1; /* initialize the stats interface */ pcap_client->ctrg = rate_ctr_group_alloc(pcap_client, &pcap_client_ctr_group_desc, 0); @@ -239,7 +240,7 @@ int main(int argc, char **argv) } /* attempt to connect to the remote */ - osmo_client_connect(pcap_client); + osmo_client_connect(&pcap_client->conn); if (daemonize) { rc = osmo_daemonize(); |