提交 30d5ecf9 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-5445 --resolve this was actually just missing one word from the code as seen…

FS-5445 --resolve this was actually just missing one word from the code as seen in the similar code in the core, the same mistake was made there where the compiler is not smart enough to see the mutually exclusive logical paths this code is specific to spontaneously creating an array in a single set like set foo[12]=val which would be totally broken if that line were commented
上级 de9bd1c3
......@@ -445,7 +445,7 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st
fly++;
}
if ((header = esl_event_get_header_ptr(event, header_name))) {
if (header || (header = esl_event_get_header_ptr(event, header_name))) {
if (index_ptr) {
if (index > -1 && index <= 4000) {
......
......@@ -916,11 +916,9 @@ static switch_status_t switch_event_base_add_header(switch_event_t *event, switc
if (index_ptr || (stack & SWITCH_STACK_PUSH) || (stack & SWITCH_STACK_UNSHIFT)) {
if (!(header = switch_event_get_header_ptr(event, header_name)) && index_ptr) {
/*
* Removing a possible leak. But it doesn't appear this is used anywhere, and even if it were then it wouldn't be working.
header = new_header(header_name);
*/
header = new_header(header_name);
if (switch_test_flag(event, EF_UNIQ_HEADERS)) {
switch_event_del_header(event, header_name);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论