Archived
14
0
Fork 0

Merged revisions 86469 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86469 | file | 2007-10-19 12:08:12 -0300 (Fri, 19 Oct 2007) | 4 lines

Set port number in received as information for registrations as well.
(closes issue #11028)
Reported by: brad-x

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86470 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
file 2007-10-19 15:10:24 +00:00
parent 5862465415
commit 06cbc25bdc

View file

@ -8212,9 +8212,10 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char *
}
/* Copy back Call-ID in case create_addr changed it */
ast_string_field_set(r, callid, p->callid);
if (r->portno)
if (r->portno) {
p->sa.sin_port = htons(r->portno);
else /* Set registry port to the port set from the peer definition/srv or default */
p->recv.sin_port = htons(r->portno);
} else /* Set registry port to the port set from the peer definition/srv or default */
r->portno = ntohs(p->sa.sin_port);
ast_set_flag(&p->flags[0], SIP_OUTGOING); /* Registration is outgoing call */
r->call = dialog_ref(p); /* Save pointer to SIP dialog */