提交 f1183ef9 authored 作者: Travis Cross's avatar Travis Cross

Fix use of switch_event_add_body

On some compilers this fixes the build.

gcc reports:

  error: format not a string literal and no format arguments

clang reports:

  error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
上级 453b42e3
...@@ -121,7 +121,7 @@ static void put_text_msg(void *user_data, const uint8_t *msg, int len) ...@@ -121,7 +121,7 @@ static void put_text_msg(void *user_data, const uint8_t *msg, int len)
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", "tdd"); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", "tdd");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "TDD MESSAGE"); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "TDD MESSAGE");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Unique-ID", switch_core_session_get_uuid(pvt->session)); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Unique-ID", switch_core_session_get_uuid(pvt->session));
switch_event_add_body(event, (char *)msg); switch_event_add_body(event, "%s", (char *)msg);
if (switch_core_session_get_partner(pvt->session, &other_session) == SWITCH_STATUS_SUCCESS) { if (switch_core_session_get_partner(pvt->session, &other_session) == SWITCH_STATUS_SUCCESS) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论