dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 59195 via svnmerge from

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

................
r59195 | file | 2007-03-23 21:39:44 -0400 (Fri, 23 Mar 2007) | 10 lines

Merged revisions 59194 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r59194 | file | 2007-03-23 21:35:49 -0400 (Fri, 23 Mar 2007) | 2 lines

Only try to handle a response if it has a response code. (ASA-2007-011)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59196 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
file 2007-03-24 01:42:11 +00:00
parent f72b189007
commit 5884570f85
1 changed files with 13 additions and 13 deletions

View File

@ -15285,20 +15285,20 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
respond appropriately */
ast_set_flag(req, SIP_PKT_IGNORE);
append_history(p, "Ignore", "Ignoring this retransmit\n");
}
e = ast_skip_blanks(e);
if (sscanf(e, "%d %n", &respid, &len) != 1) {
ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
} else {
if (respid <= 0) {
ast_log(LOG_WARNING, "Invalid SIP response code: '%d'\n", respid);
return 0;
} else if (e) {
e = ast_skip_blanks(e);
if (sscanf(e, "%d %n", &respid, &len) != 1) {
ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
} else {
if (respid <= 0) {
ast_log(LOG_WARNING, "Invalid SIP response code: '%d'\n", respid);
return 0;
}
/* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
extract_uri(p, req);
handle_response(p, respid, e + len, req, seqno);
}
/* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
extract_uri(p, req);
handle_response(p, respid, e + len, req, seqno);
}
return 0;
}