diff options
author | Florin Coras <fcoras@cisco.com> | 2019-02-08 18:27:29 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-02-11 16:05:37 +0000 |
commit | c1a4265b4b76bf7874b53e866549371c8daf70f4 (patch) | |
tree | cce5e97b1b36433d4211fd05b2b4794a40bccf76 /src/vnet/session-apps | |
parent | c69ac31208059a8ed8b9ef6056b6aaf6e6629cb8 (diff) |
session: cleanup application interface
Change-Id: I89d240753b3f3c5e984aa303a7c8fa35fa59bf7f
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session-apps')
-rw-r--r-- | src/vnet/session-apps/echo_client.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/vnet/session-apps/echo_client.c b/src/vnet/session-apps/echo_client.c index c39f787c093..8b7788fa266 100644 --- a/src/vnet/session-apps/echo_client.c +++ b/src/vnet/session-apps/echo_client.c @@ -511,7 +511,7 @@ echo_clients_attach (u8 * appns_id, u64 appns_flags, u64 appns_secret) echo_client_main_t *ecm = &echo_client_main; vnet_app_attach_args_t _a, *a = &_a; u64 options[16]; - clib_error_t *error = 0; + int rv; clib_memset (a, 0, sizeof (*a)); clib_memset (options, 0, sizeof (options)); @@ -541,8 +541,8 @@ echo_clients_attach (u8 * appns_id, u64 appns_flags, u64 appns_secret) a->options = options; a->namespace_id = appns_id; - if ((error = vnet_application_attach (a))) - return error; + if ((rv = vnet_application_attach (a))) + return clib_error_return (0, "attach returned %d", rv); ecm->app_index = a->app_index; return 0; @@ -592,8 +592,7 @@ echo_clients_connect (vlib_main_t * vm, u32 n_clients) { echo_client_main_t *ecm = &echo_client_main; vnet_connect_args_t _a, *a = &_a; - clib_error_t *error = 0; - int i; + int i, rv; clib_memset (a, 0, sizeof (*a)); for (i = 0; i < n_clients; i++) @@ -602,8 +601,8 @@ echo_clients_connect (vlib_main_t * vm, u32 n_clients) a->api_context = i; a->app_index = ecm->app_index; - if ((error = vnet_connect_uri (a))) - return error; + if ((rv = vnet_connect_uri (a))) + return clib_error_return (0, "connect returned: %d", rv); /* Crude pacing for call setups */ if ((i % 4) == 0) |