mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
res_pjsip: Use correct pool for storing the contact_user value.
When replacing the user portion of the Contact URI the code was using the ephemeral pool instead of the tdata pool. This could cause the Contact user value to become invalid after a period of time. The code will now use the tdata pool which persists for the lifetime of the message instead. ASTERISK-28794 Change-Id: I31e7b958e397cbdaeedd0ebb70bcf8dd2ed3c4d5
This commit is contained in:
committed by
Joshua Colp
parent
81929d478c
commit
b37d7b5d0a
@@ -3913,7 +3913,7 @@ static int create_out_of_dialog_request(const pjsip_method *method, struct ast_s
|
||||
contact_hdr = pjsip_msg_find_hdr_by_names((*tdata)->msg, &HCONTACT, &HCONTACTSHORT, NULL);
|
||||
if (contact_hdr) {
|
||||
contact_uri = pjsip_uri_get_uri(contact_hdr->uri);
|
||||
pj_strdup2(pool, &contact_uri->user, endpoint->contact_user);
|
||||
pj_strdup2((*tdata)->pool, &contact_uri->user, endpoint->contact_user);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user