]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[ftmod_misdn] Add missing braces around condition of ternary operator.
authorStefan Knoblich <stkn@openisdn.net>
Fri, 10 Feb 2012 12:14:29 +0000 (13:14 +0100)
committerStefan Knoblich <stkn@openisdn.net>
Fri, 10 Feb 2012 12:22:47 +0000 (13:22 +0100)
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 <stkn@openisdn.net>
libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c

index 8d3bd8df2897040089676a08d61ff01d63673d5b..d74c54934bf1e8a2a35255297e9531eba8743ae9 100644 (file)
@@ -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 */