summaryrefslogtreecommitdiffstats
path: root/common/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/debug.c')
-rw-r--r--common/debug.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/debug.c b/common/debug.c
index e497501..8ad0f08 100644
--- a/common/debug.c
+++ b/common/debug.c
@@ -39,6 +39,8 @@
39#include "asprintf.h" 39#include "asprintf.h"
40#endif 40#endif
41 41
42#define MAX_PRINT_LEN 16*1024
43
42int debug_level = 0; 44int debug_level = 0;
43 45
44/** 46/**
@@ -163,7 +165,11 @@ void debug_plist_real(const char *func, const char *file, int line, plist_t plis
163 if (buffer[length-1] == '\n') 165 if (buffer[length-1] == '\n')
164 buffer[length-1] = '\0'; 166 buffer[length-1] = '\0';
165 167
166 debug_info_real(func, file, line, "printing %i bytes plist:\n%s", length, buffer); 168 if (length <= MAX_PRINT_LEN)
169 debug_info_real(func, file, line, "printing %i bytes plist:\n%s", length, buffer);
170 else
171 debug_info_real(func, file, line, "supress printing %i bytes plist...\n", length);
172
167 free(buffer); 173 free(buffer);
168#endif 174#endif
169} 175}