Changeset 762
- Timestamp:
- 07/14/06 01:11:45 (6 years ago)
- File:
-
- 1 edited
-
branches/ithildin-1.1/source/log.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ithildin-1.1/source/log.c
r578 r762 83 83 } 84 84 85 /* Recursion protection for logged messages. If we log_*() and then hook an 86 * event which generates a log_*() we can end up in serious trouble. :) */ 87 #define LOG_RECURSE_MAX 10 88 static uint32_t log_recursed; 89 85 90 void log_vmsg(enum logtypes type, const char *mod, const char *msg, 86 91 va_list ap) { … … 91 96 return; /* avoid doing anything for debug messages when we don't 92 97 want to */ 98 99 log_recursed++; 100 if (log_recursed == LOG_RECURSE_MAX) { 101 log_recursed--; 102 return; 103 } 93 104 94 105 vsnprintf(logmsg, LOG_MSG_MAXLEN, msg, ap); … … 115 126 break; 116 127 } 128 129 log_recursed--; 117 130 } 118 131
Note: See TracChangeset
for help on using the changeset viewer.
