Merge pull request #1851 from signalwire/nodupremove

[Core] Remove deprecated SWITCH_STACK_NODUP flag. Change switch_event_add_header_string() behavior to always dup.
This commit is contained in:
Andrey Volk 2022-11-08 02:36:35 +03:00 committed by GitHub
commit bb682fc5b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -1203,9 +1203,8 @@ SWITCH_STACK_TOP - Stack on the top
typedef enum {
SWITCH_STACK_BOTTOM = (1 << 0),
SWITCH_STACK_TOP = (1 << 1),
SWITCH_STACK_NODUP = (1 << 2),
SWITCH_STACK_UNSHIFT = (1 << 3),
SWITCH_STACK_PUSH = (1 << 4),
SWITCH_STACK_UNSHIFT = (1 << 2),
SWITCH_STACK_PUSH = (1 << 3)
} switch_stack_t;
/*!

View File

@ -1246,7 +1246,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_add_header_string_nodup(switch_even
SWITCH_DECLARE(switch_status_t) switch_event_add_header_string(switch_event_t *event, switch_stack_t stack, const char *header_name, const char *data)
{
if (data) {
return switch_event_base_add_header(event, stack, header_name, (stack & SWITCH_STACK_NODUP) ? (char *)data : DUP(data));
return switch_event_base_add_header(event, stack, header_name, DUP(data));
}
return SWITCH_STATUS_GENERR;
}