freetdm: merge native bridge fix from releases.3.4

which solves the crash on outgoing calls after native bridge
This commit is contained in:
James Zhang
2012-03-16 12:24:10 -04:00
parent 46ddfc0ebb
commit 63a2c847eb
4 changed files with 39 additions and 27 deletions

View File

@@ -2453,6 +2453,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);