From 64f71ce22352d06abaec4f83c1530b3ec02440ef Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 17 May 2007 05:07:00 +0000 Subject: use endpoint option --- src/wsman.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/wsman.c') diff --git a/src/wsman.c b/src/wsman.c index 58a690a..4034e75 100644 --- a/src/wsman.c +++ b/src/wsman.c @@ -59,6 +59,7 @@ static const char **wsman_argv = NULL; static int server_port = 0; static char *cafile = NULL; +static char *endpoint = NULL; static char *username = NULL; static char *password = NULL; static char *server = "localhost"; @@ -146,6 +147,8 @@ char wsman_parse_options(int argc, char **argv) "Password", ""}, {"hostname", 'h', U_OPTION_ARG_STRING, &server, "Host name", ""}, + {"endpoint", 'b', U_OPTION_ARG_STRING, &endpoint, + "End point", ""}, {"port", 'P', U_OPTION_ARG_INT, &server_port, "Server Port", ""}, {"proxy", 'X', U_OPTION_ARG_STRING, &proxy, @@ -453,12 +456,16 @@ int main(int argc, char **argv) debug("Certificate: %s", cafile); - cl = wsmc_create(server, - server_port, - url_path, - cafile? "https" : "http", - username, - password); + if (endpoint) { + cl = wsmc_create_from_uri(endpoint); + } else { + cl = wsmc_create(server, + server_port, + url_path, + cafile? "https" : "http", + username, + password); + } wsmc_transport_set_auth_request_func(cl , &request_usr_pwd ); -- cgit