summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnas Nashif <nashif@intel.com>2007-08-02 21:48:14 +0000
committerAnas Nashif <nashif@intel.com>2007-08-02 21:48:14 +0000
commit91ebf09155455aa34a9469ece68d83c7cb2c2d0f (patch)
tree6ff866d043bddf8389169125878f1f15e834beb2 /src
parentf5427c38cd083759038724c4d0f5344d8fbd64d1 (diff)
downloadwsmancli-91ebf09155455aa34a9469ece68d83c7cb2c2d0f.tar.gz
wsmancli-91ebf09155455aa34a9469ece68d83c7cb2c2d0f.tar.xz
wsmancli-91ebf09155455aa34a9469ece68d83c7cb2c2d0f.zip
fixed cpp client
removed obsolete client
Diffstat (limited to 'src')
-rw-r--r--src/wsman.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/wsman.c b/src/wsman.c
index 6fff78f..02fba8c 100644
--- a/src/wsman.c
+++ b/src/wsman.c
@@ -298,7 +298,7 @@ char wsman_parse_options(int argc, char **argv)
}
u_error_free(error);
- // set default options
+ // set default options
if (server_port == 0) {
server_port = cainfo ? 8888 : 8889;
}
@@ -363,8 +363,8 @@ request_usr_pwd( WsManClient *client, wsman_auth_type_t auth,
wsmc_transport_get_auth_name( auth));
*/
printf("User name: ");
- fflush(stdout);
- if ( (p = fgets(user, 20, stdin) ) != NULL )
+ fflush(stdout);
+ if ( (p = fgets(user, 20, stdin) ) != NULL )
{
if (strchr(user, '\n'))
@@ -467,7 +467,7 @@ int main(int argc, char **argv)
cl = wsmc_create(server,
server_port,
url_path,
- cainfo? "https" : "http",
+ cainfo? "https" : "http",
username,
password);
}
@@ -711,8 +711,10 @@ int main(int argc, char **argv)
if (wsmc_get_response_code(cl) != 200
&& wsmc_get_response_code(cl) != 400
&& wsmc_get_response_code(cl) != 500) {
+ u_free(enumContext);
break;
}
+ u_free(enumContext);
enumContext = wsmc_get_enum_context(doc);
if (doc) {
ws_xml_destroy_doc(doc);
@@ -735,9 +737,8 @@ int main(int argc, char **argv)
}
}
wsmc_options_destroy(options);
- wsmc_release(cl);
-
wsmc_transport_fini();
+ wsmc_release(cl);
if (ini) {
iniparser_freedict(ini);
}