Merged revisions 168128 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168128 | mmichelson | 2009-01-09 14:08:04 -0600 (Fri, 09 Jan 2009) | 13 lines Add check_via calls to more request handlers INFO, NOTIFY, OPTIONS, REFER, and MESSAGE requests were not checking the topmost Via to determine where to send the response. Adding check_via calls to those request handlers solves this. (closes issue #13071) Reported by: baron Patches: check_via.patch uploaded by baron (license 531) Tested by: baron ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
4d1500edbd
commit
9f355bf9fc
|
@ -15150,6 +15150,7 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
|
|||
unsigned int event;
|
||||
const char *c = get_header(req, "Content-Type");
|
||||
|
||||
check_via(p, req);
|
||||
/* Need to check the media/type */
|
||||
if (!strcasecmp(c, "application/dtmf-relay") ||
|
||||
!strcasecmp(c, "application/vnd.nortelnetworks.digits")) {
|
||||
|
@ -17529,6 +17530,7 @@ static int handle_request_notify(struct sip_pvt *p, struct sip_request *req, str
|
|||
char *eventid = NULL;
|
||||
char *sep;
|
||||
|
||||
check_via(p, req);
|
||||
if( (sep = strchr(event, ';')) ) { /* XXX bug here - overwriting string ? */
|
||||
*sep++ = '\0';
|
||||
eventid = sep;
|
||||
|
@ -17688,6 +17690,7 @@ static int handle_request_options(struct sip_pvt *p, struct sip_request *req)
|
|||
(this needs to be fixed in 1.4 as well)
|
||||
*/
|
||||
|
||||
check_via(p, req);
|
||||
if (p->lastinvite) {
|
||||
/* if this is a request in an active dialog, just confirm that the dialog exists. */
|
||||
transmit_response_with_allow(p, "200 OK", req, 0);
|
||||
|
@ -19064,6 +19067,7 @@ static int handle_request_refer(struct sip_pvt *p, struct sip_request *req, int
|
|||
|
||||
int res = 0;
|
||||
|
||||
check_via(p, req);
|
||||
if (req->debug)
|
||||
ast_verbose("Call %s got a SIP call transfer from %s: (REFER)!\n", p->callid, ast_test_flag(&p->flags[0], SIP_OUTGOING) ? "callee" : "caller");
|
||||
|
||||
|
@ -19603,6 +19607,7 @@ static int handle_request_bye(struct sip_pvt *p, struct sip_request *req)
|
|||
static int handle_request_message(struct sip_pvt *p, struct sip_request *req)
|
||||
{
|
||||
if (!req->ignore) {
|
||||
check_via(p, req);
|
||||
if (req->debug)
|
||||
ast_verbose("Receiving message!\n");
|
||||
receive_message(p, req);
|
||||
|
|
Loading…
Reference in New Issue