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:
commit
bb682fc5b4
|
@ -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;
|
||||
|
||||
/*!
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue