[Core] Remove deprecated SWITCH_STACK_NODUP flag. Change switch_event_add_header_string() behavior to always dup.
This commit is contained in:
parent
9675ef689f
commit
17453e0079
|
@ -1203,9 +1203,8 @@ SWITCH_STACK_TOP - Stack on the top
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SWITCH_STACK_BOTTOM = (1 << 0),
|
SWITCH_STACK_BOTTOM = (1 << 0),
|
||||||
SWITCH_STACK_TOP = (1 << 1),
|
SWITCH_STACK_TOP = (1 << 1),
|
||||||
SWITCH_STACK_NODUP = (1 << 2),
|
SWITCH_STACK_UNSHIFT = (1 << 2),
|
||||||
SWITCH_STACK_UNSHIFT = (1 << 3),
|
SWITCH_STACK_PUSH = (1 << 3)
|
||||||
SWITCH_STACK_PUSH = (1 << 4),
|
|
||||||
} switch_stack_t;
|
} 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)
|
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) {
|
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;
|
return SWITCH_STATUS_GENERR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue