From 124c04624adaea6779f5537a1961ca8312ec35a8 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Fri, 10 Feb 2012 13:14:29 +0100 Subject: [PATCH] [ftmod_misdn] Add missing braces around condition of ternary operator. For compilers that seem to do the wrong thing(tm). Speculative fix for: segfault at 1 ip b72145d3 sp b58f8bfc error 4 in libc-2.11.3.so #0 0xb7a5d5d3 in vfprintf () from /lib/i686/cmov/libc.so.6 #1 0xb7a7cec7 in vasprintf () from /lib/i686/cmov/libc.so.6 #2 0xb7dd7c5b in switch_vasprintf (...) #3 0xb6296de2 in ftdm_logger (...) #4 0xb621625d in misdn_handle_mph_information_ind (...) at ftmod_misdn.c:658 Signed-off-by: Stefan Knoblich --- libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c b/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c index 8d3bd8df28..d74c54934b 100644 --- a/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c +++ b/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c @@ -661,7 +661,7 @@ static int misdn_handle_mph_information_ind(ftdm_channel_t *chan, const struct m bch_info = &info->bch[0]; ftdm_log_chan(chan, FTDM_LOG_DEBUG, "mISDN port state:\n\tD-Chan state:\t%hu\n\tD-Chan flags:\t%#lx\n\tD-Chan proto:\t%hu\n\tD-Chan active:\t%s\n", - info->dch.state, info->dch.ch.Flags, info->dch.ch.protocol, info->dch.ch.Flags & (1 << 6) ? "yes" : "no"); + info->dch.state, info->dch.ch.Flags, info->dch.ch.protocol, (info->dch.ch.Flags & (1 << 6)) ? "yes" : "no"); /* TODO: try to translate this to a usable set of alarm flags */