提交 ff8be624 authored 作者: Michael Jerris's avatar Michael Jerris

clean error handling on user endpoint

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7397 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 84161010
......@@ -1434,7 +1434,6 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
switch_assert(params);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "as_channel", "true");
if (switch_xml_locate_user("id", user, domain, NULL, &xml, &x_domain, &x_user, params) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "can't find user [%s@%s]\n", user, domain);
goto done;
......@@ -1464,10 +1463,6 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
}
}
done:
switch_event_destroy(&params);
if (dest) {
const char *var;
char *d_dest = NULL;
......@@ -1530,10 +1525,14 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
}
}
done:
if (xml) {
switch_xml_free(xml);
}
switch_event_destroy(&params);
switch_safe_free(user);
return cause;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论