mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 14:28:24 +00:00
Merge "res_pjsip: Allow global headers to be overridden." into 13
This commit is contained in:
@@ -87,6 +87,14 @@ static void add_headers_to_message(struct header_list *headers, pjsip_tx_data *t
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AST_LIST_TRAVERSE(headers, iter, next) {
|
AST_LIST_TRAVERSE(headers, iter, next) {
|
||||||
|
pj_str_t name;
|
||||||
|
pjsip_generic_string_hdr *hdr;
|
||||||
|
|
||||||
|
hdr = pjsip_msg_find_hdr_by_name(tdata->msg, pj_cstr(&name, iter->name), NULL);
|
||||||
|
if (hdr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ast_sip_add_header(tdata, iter->name, iter->value);
|
ast_sip_add_header(tdata, iter->name, iter->value);
|
||||||
};
|
};
|
||||||
tdata->mod_data[global_header_mod.id] = &handled_id;
|
tdata->mod_data[global_header_mod.id] = &handled_id;
|
||||||
|
|||||||
Reference in New Issue
Block a user