aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-20 21:00:44 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-20 21:00:44 +0000
commitcd8c467f7c202fab9df143009d3cb9b6903f0280 (patch)
treef9fd95df6058f025cda9c1ccfa981f1c0a119f5c /channels
parent2f20160cc315667d2bb75db08916676bd2c4f6ae (diff)
Remove changes to via processing that were not supposed to go into the last commit.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@299198 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 5953d1a61..46027f6bf 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4947,69 +4947,6 @@ static struct sip_pvt *sip_alloc(ast_string_field callid, struct sockaddr_in *si
return p;
}
-/*!
- * \brief Parse a Via header
- *
- * \note This function does not parse all of the elmentes of the via header at
- * this time.
- *
- * VIA syntax. RFC 3261 section 25.1
- * Via = ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm)
- * via-parm = sent-protocol LWS sent-by *( SEMI via-params )
- * via-params = via-ttl / via-maddr
- * / via-received / via-branch
- * / via-extension
- * via-ttl = "ttl" EQUAL ttl
- * via-maddr = "maddr" EQUAL host
- * via-received = "received" EQUAL (IPv4address / IPv6address)
- * via-branch = "branch" EQUAL token
- * via-extension = generic-param
- * sent-protocol = protocol-name SLASH protocol-version
- * SLASH transport
- * protocol-name = "SIP" / token
- * protocol-version = token
- * transport = "UDP" / "TCP" / "TLS" / "SCTP"
- * / other-transport
- * sent-by = host [ COLON port ]
- * ttl = 1*3DIGIT ; 0 to 255
- */
-static void get_viabranch(char *via, char **sent_by, char **branch)
-{
- char *tmp;
-
- if (sent_by) {
- *sent_by = NULL;
- }
- if (branch) {
- *branch = NULL;
- }
- if (ast_strlen_zero(via)) {
- return;
- }
-
- /* chop off sent-protocol */
- strsep(&via, " \t\r\n");
- if (ast_strlen_zero(via)) {
- return;
- }
-
- /* chop off sent-by */
- via = ast_skip_blanks(via);
- *sent_by = strsep(&via, "; \t\r\n");
- if (ast_strlen_zero(via)) {
- return;
- }
-
- /* now see if there is a branch parameter in there */
- if (branch && (tmp = strstr(via, "branch="))) {
- /* find the branch ID */
- via = ast_skip_blanks(tmp + 7);
-
- /* chop off the branch parameter */
- *branch = strsep(&via, "; \t\r\n");
- }
-}
-
/*! \brief Connect incoming SIP message to current dialog or create new dialog structure
Called by handle_request, sipsock_read */
static struct sip_pvt *find_call(struct sip_request *req, struct sockaddr_in *sin, const int intended_method)
@@ -6612,7 +6549,6 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg
{
char newto[256];
const char *ot;
- char *via, *sent_by;
init_resp(resp, msg);
copy_via_headers(p, resp, req, "Via");
@@ -6655,13 +6591,6 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg
} else if (!ast_strlen_zero(p->our_contact) && resp_needs_contact(msg, p->method)) {
add_header(resp, "Contact", p->our_contact);
}
-
- via = ast_strdupa(get_header(req, "Via"));
- get_viabranch(via, &sent_by, NULL);
- if (!ast_strlen_zero(sent_by)) {
- set_destination(p, sent_by);
- }
-
return 0;
}