aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-03-26 00:17:17 +0100
committerEwan Mellor <ewan@xensource.com>2007-03-26 00:17:17 +0100
commit275caa6d09bc5c199ba5d1e142aa2bf49a3ad9a6 (patch)
treec96e498ec625bbf806c1163fb85dd684766b989f /tools/libxen
parentc664b945622ce8cdd0548e5c2c013ff04ba7db12 (diff)
downloadxen-275caa6d09bc5c199ba5d1e142aa2bf49a3ad9a6.tar.gz
xen-275caa6d09bc5c199ba5d1e142aa2bf49a3ad9a6.tar.bz2
xen-275caa6d09bc5c199ba5d1e142aa2bf49a3ad9a6.zip
Added I/O debugging mode.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen')
-rw-r--r--tools/libxen/test/test_bindings.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/libxen/test/test_bindings.c b/tools/libxen/test/test_bindings.c
index 0904ec3ca8..96ac6ef12f 100644
--- a/tools/libxen/test/test_bindings.c
+++ b/tools/libxen/test/test_bindings.c
@@ -34,6 +34,7 @@
#include "xen_vm.h"
#include "xen_vm_metrics.h"
+//#define PRINT_XML
static void usage()
{
@@ -71,6 +72,11 @@ static size_t
write_func(void *ptr, size_t size, size_t nmemb, xen_comms *comms)
{
size_t n = size * nmemb;
+#ifdef PRINT_XML
+ printf("\n\n---Result from server -----------------------\n");
+ printf("%s\n",((char*) ptr));
+ fflush(stdout);
+#endif
return comms->func(ptr, n, comms->handle) ? n : 0;
}
@@ -81,6 +87,12 @@ call_func(const void *data, size_t len, void *user_handle,
{
(void)user_handle;
+#ifdef PRINT_XML
+ printf("\n\n---Data to server: -----------------------\n");
+ printf("%s\n",((char*) data));
+ fflush(stdout);
+#endif
+
CURL *curl = curl_easy_init();
if (!curl) {
return -1;