From 3e6af058ebce582c43af16450c9719fbe2cb65cb Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 12 Jan 2010 19:50:07 +0100 Subject: Add debug function to print a plist --- src/debug.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/debug.c') diff --git a/src/debug.c b/src/debug.c index cf93e01..8912b3a 100644 --- a/src/debug.c +++ b/src/debug.c @@ -134,3 +134,16 @@ inline void debug_buffer_to_file(const char *file, const char *data, const int l } #endif } + +inline void debug_plist(plist_t plist) +{ + if (!plist) + return; + + char *buffer = NULL; + uint32_t length = 0; + plist_to_xml(plist, &buffer, &length); + debug_info("plist size: %i\nbuffer :\n%s", length, buffer); + free(buffer); +} + -- cgit v1.1-32-gdbae