diff options
| author | 2010-01-12 17:53:55 +0100 | |
|---|---|---|
| committer | 2010-01-12 17:53:55 +0100 | |
| commit | bf3dc421b2b5ccfe2fcd3cd4ec1ef90f39599600 (patch) | |
| tree | 9108ac43b6fbbc45eb9ea4aed3a2234590aaf501 /src/debug.c | |
| parent | 3b57fa5d0ed2d8060233fa9604bd7f98a7d6cdab (diff) | |
| download | libimobiledevice-bf3dc421b2b5ccfe2fcd3cd4ec1ef90f39599600.tar.gz libimobiledevice-bf3dc421b2b5ccfe2fcd3cd4ec1ef90f39599600.tar.bz2 | |
Remove support for debug masks due to inconsistent use
Diffstat (limited to 'src/debug.c')
| -rw-r--r-- | src/debug.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/debug.c b/src/debug.c index b5f74ad..78f3a17 100644 --- a/src/debug.c +++ b/src/debug.c | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | #include "libiphone/libiphone.h" | 26 | #include "libiphone/libiphone.h" |
| 27 | 27 | ||
| 28 | int toto_debug = 0; | 28 | int toto_debug = 0; |
| 29 | uint16_t dbg_mask = 0; | ||
| 30 | 29 | ||
| 31 | /** | 30 | /** |
| 32 | * Sets the level of debugging. Currently the only acceptable values are 0 and | 31 | * Sets the level of debugging. Currently the only acceptable values are 0 and |
| @@ -39,17 +38,6 @@ void iphone_set_debug_level(int level) | |||
| 39 | toto_debug = level; | 38 | toto_debug = level; |
| 40 | } | 39 | } |
| 41 | 40 | ||
| 42 | |||
| 43 | /** | ||
| 44 | * Set debug ids to display. Values can be OR-ed | ||
| 45 | * | ||
| 46 | * @param level Set to 0 for no debugging or 1 for debugging. | ||
| 47 | */ | ||
| 48 | void iphone_set_debug_mask(uint16_t mask) | ||
| 49 | { | ||
| 50 | dbg_mask = mask; | ||
| 51 | } | ||
| 52 | |||
| 53 | void log_debug_msg(const char *format, ...) | 41 | void log_debug_msg(const char *format, ...) |
| 54 | { | 42 | { |
| 55 | #ifndef STRIP_DEBUG_CODE | 43 | #ifndef STRIP_DEBUG_CODE |
| @@ -66,21 +54,6 @@ void log_debug_msg(const char *format, ...) | |||
| 66 | #endif | 54 | #endif |
| 67 | } | 55 | } |
| 68 | 56 | ||
| 69 | void log_dbg_msg(uint16_t id, const char *format, ...) | ||
| 70 | { | ||
| 71 | #ifndef STRIP_DEBUG_CODE | ||
| 72 | if (id & dbg_mask) { | ||
| 73 | va_list args; | ||
| 74 | /* run the real fprintf */ | ||
| 75 | va_start(args, format); | ||
| 76 | |||
| 77 | vfprintf(stderr, format, args); | ||
| 78 | |||
| 79 | va_end(args); | ||
| 80 | } | ||
| 81 | #endif | ||
| 82 | } | ||
| 83 | |||
| 84 | inline void log_debug_buffer(const char *data, const int length) | 57 | inline void log_debug_buffer(const char *data, const int length) |
| 85 | { | 58 | { |
| 86 | #ifndef STRIP_DEBUG_CODE | 59 | #ifndef STRIP_DEBUG_CODE |
