diff options
author | Anas Nashif <nashif@intel.com> | 2007-10-25 02:48:05 +0000 |
---|---|---|
committer | Anas Nashif <nashif@intel.com> | 2007-10-25 02:48:05 +0000 |
commit | 76a144e4d0b9d5bc37c1b04b99b9f01ef886e8a7 (patch) | |
tree | 49bf29e6020d9e279ce61632ecb655af770f2f17 | |
parent | ca4a62a4466b11c3281a7fcbb55c51dbc0183d30 (diff) | |
download | wsmancli-76a144e4d0b9d5bc37c1b04b99b9f01ef886e8a7.tar.gz wsmancli-76a144e4d0b9d5bc37c1b04b99b9f01ef886e8a7.tar.xz wsmancli-76a144e4d0b9d5bc37c1b04b99b9f01ef886e8a7.zip |
invoke custom action from a file (Chris Poblete)
-rw-r--r-- | src/wsman.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/wsman.c b/src/wsman.c index 1ac5e01..f5cd61d 100644 --- a/src/wsman.c +++ b/src/wsman.c @@ -30,7 +30,6 @@ /** * @author Anas Nashif - * @author Eugene Yarmosh * @author Vadim Revyakin */ #ifdef HAVE_CONFIG_H @@ -51,7 +50,7 @@ #include <wsman-client-api.h> #include <wsman-client-transport.h> #include <wsman-debug.h> -// #include "wsman-client-options.h" + #if __linux__ extern char *getpass (const char *__prompt); @@ -628,10 +627,13 @@ int main(int argc, char **argv) } break; case WSMAN_ACTION_CUSTOM: - + if (input) { + resource = wsmc_read_file(input, wsmc_get_encoding(cl), 0); + } doc = wsmc_action_invoke(cl, resource_uri, options, invoke_method, - NULL); + resource); + ws_xml_destroy_doc(resource); wsman_output(cl, doc); if (doc) { ws_xml_destroy_doc(doc); @@ -663,8 +665,7 @@ int main(int argc, char **argv) if (input) { printf("input file provided\n"); resource = wsmc_read_file(input, wsmc_get_encoding(cl), 0); - doc = - wsmc_action_put(cl, resource_uri, options, + doc = wsmc_action_put(cl, resource_uri, options, resource); ws_xml_destroy_doc(resource); } else { |