Browse Source

fix segfault related to null log_info

git.mgm/mediaproxy-ng/2.2
Richard Fuchs 13 years ago
parent
commit
ecc37e4b2a
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      daemon/call.c
  2. +1
    -0
      daemon/str.h

+ 1
- 1
daemon/call.c View File

@ -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;


+ 1
- 0
daemon/str.h View File

@ -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