fix segfault related to null log_info

git.mgm/mediaproxy-ng/2.2
Richard Fuchs 13 years ago
parent b66809bb8c
commit ecc37e4b2a

@ -37,7 +37,7 @@
#define LOG_PREFIX_C "[%.*s] "
#define LOG_PREFIX_CI "[%.*s - %.*s] "
#define LOG_PARAMS_C(c) STR_FMT(&(c)->callid)
#define LOG_PARAMS_CI(c) STR_FMT(&(c)->callid), STR_FMT(log_info)
#define LOG_PARAMS_CI(c) STR_FMT(&(c)->callid), STR_FMT0(log_info)
static __thread const str *log_info;

@ -21,6 +21,7 @@ typedef struct _str str;
#define STR_FORMAT "%.*s"
#define STR_FMT(str) (str)->len, (str)->s
#define STR_FMT0(str) ((str) ? (str)->len : 6), ((str) ? (str)->s : "(NULL)")
#define STR_NULL (str) { NULL, 0 }
#define STR_EMPTY (str) { "", 0 }

Loading…
Cancel
Save