summaryrefslogtreecommitdiffstats
path: root/src/debug.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-12 19:50:07 +0100
committerGravatar Martin Szulecki2010-01-12 19:50:07 +0100
commit3e6af058ebce582c43af16450c9719fbe2cb65cb (patch)
treec47f4d12ac80c714a103e5a7129fcea315e3af09 /src/debug.c
parent04e1f74afe0efe4d09affed9b9fee08847b78ab9 (diff)
downloadlibimobiledevice-3e6af058ebce582c43af16450c9719fbe2cb65cb.tar.gz
libimobiledevice-3e6af058ebce582c43af16450c9719fbe2cb65cb.tar.bz2
Add debug function to print a plist
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c13
1 files changed, 13 insertions, 0 deletions
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
134 } 134 }
135#endif 135#endif
136} 136}
137
138inline void debug_plist(plist_t plist)
139{
140 if (!plist)
141 return;
142
143 char *buffer = NULL;
144 uint32_t length = 0;
145 plist_to_xml(plist, &buffer, &length);
146 debug_info("plist size: %i\nbuffer :\n%s", length, buffer);
147 free(buffer);
148}
149