dect
/
asterisk
Archived
13
0
Fork 0

Only try to use the invite_branch on outgoing INVITEs with auth credentials.

I have added a comment to the code to help ease understanding of the logic here
as well.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@199958 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
mmichelson 2009-06-10 20:15:48 +00:00
parent 34a95d7919
commit 41c14a1987
1 changed files with 5 additions and 1 deletions

View File

@ -8967,7 +8967,11 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
seqno = p->ocseq;
}
if (sipmethod == SIP_CANCEL || sipmethod == SIP_INVITE) {
/* A CANCEL must have the same branch as the INVITE that it is canceling.
* Similarly, if we need to re-send an INVITE with auth credentials, then we
* need to use the same branch as we did the first time we sent the INVITE.
*/
if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && !ast_strlen_zero(p->options->auth))) {
p->branch = p->invite_branch;
build_via(p);
} else if (newbranch) {