freetdm: Fix redmine issue #2931 - Crash on SIP to SS7 call after sigbridge call

The code was improperly using peer_data as an indicator that the sigbridge
         ss7 mode was enabled. The channel flag FTDM_CHANNEL_NATIVE_SIGBRDIGE should
         be used instead
This commit is contained in:
Moises Silva
2012-03-07 19:04:31 -05:00
committed by James Zhang
parent eeec65265a
commit 3c4fdca9e0
2 changed files with 9 additions and 3 deletions

View File

@@ -2449,6 +2449,12 @@ FT_DECLARE(ftdm_status_t) ftdm_get_channel_from_string(const char *string_id, ft
*out_span = NULL;
*out_channel = NULL;
if (!string_id) {
ftdm_log(FTDM_LOG_ERROR, "Cannot parse NULL channel id string\n");
status = FTDM_EINVAL;
goto done;
}
rc = sscanf(string_id, "%u:%u", &span_id, &chan_id);
if (rc != 2) {
ftdm_log(FTDM_LOG_ERROR, "Failed to parse channel id string '%s'\n", string_id);