summaryrefslogtreecommitdiffstats
path: root/examples/new_api_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/new_api_example.c')
-rw-r--r--examples/new_api_example.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/new_api_example.c b/examples/new_api_example.c
index 93e9ee1..e882fcc 100644
--- a/examples/new_api_example.c
+++ b/examples/new_api_example.c
@@ -6,7 +6,7 @@ int main(int argc, char** argv)
{
int sid;
int eid;
- int lid;
+ int sid1;
int i = 0;
char *response;
char retval = 0;
@@ -75,27 +75,28 @@ int main(int argc, char** argv)
}
printf("******** Pull response (%d) *******\n%s\n", i,
response);
- lid = wsman_session_resource_locator_create(sid, response);
- response = wsman_resource_locator_transfer_get(lid, 0);
+ sid1 = wsman_session_resource_locator_new(sid, response);
+ response = wsman_session_transfer_get(sid1, 0);
if (!response) {
printf("******** Transfer Get failed - %s ********\n\n",
- wsman_session_error(lid));
- continue;
+ wsman_session_error(sid1));
+ goto continuep;
}
printf ("******** Transfer Get response ********\n%s\n",
response);
- response = wsman_resource_locator_transfer_put(
- lid, response, 0);
+ response = wsman_session_transfer_put(sid1, response, 0);
if (!response) {
printf("******** Transfer Put failed - %s ********\n\n",
- wsman_session_error(lid));
- continue;
+ wsman_session_error(sid1));
+ goto continuep;
}
printf ("******** Transfer Put response ********\n%s\n",
response);
+ continuep:
+ wsman_session_close(sid1);
}
wsman_session_close(sid);