[svn-commits] mmichelson: branch mmichelson/issue14220 r169191 - /team/mmichelson/issue1422...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Jan 17 15:21:07 CST 2009


Author: mmichelson
Date: Sat Jan 17 15:21:07 2009
New Revision: 169191

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=169191
Log:
More progress


Modified:
    team/mmichelson/issue14220/channels/chan_sip.c

Modified: team/mmichelson/issue14220/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/team/mmichelson/issue14220/channels/chan_sip.c?view=diff&rev=169191&r1=169190&r2=169191
==============================================================================
--- team/mmichelson/issue14220/channels/chan_sip.c (original)
+++ team/mmichelson/issue14220/channels/chan_sip.c Sat Jan 17 15:21:07 2009
@@ -6241,7 +6241,7 @@
 	int len = strlen(name);
 
 	while (*start < req->sdp_end) {
-		const char *r = get_body_by_line(req->line[(*start)++], name, len, '=');
+		const char *r = get_body_by_line(req->data->str + req->line[(*start)++], name, len, '=');
 		if (r[0] != '\0')
 			return r;
 	}
@@ -6265,7 +6265,7 @@
 	char *r;
 
 	for (x = 0; x < req->lines; x++) {
-		r = get_body_by_line(req->line[x], name, len, delimiter);
+		r = get_body_by_line(req->data->str + req->line[x], name, len, delimiter);
 		if (r[0] != '\0')
 			return r;
 	}
@@ -8069,7 +8069,7 @@
 	ast_str_append(&req->data, 0, "%s: %s\r\n", var, value);
 	req->header[req->headers] = req->data->str + req->len;
 
-	req->len += strlen(req->header[req->headers]);
+	req->len = req->data->used;
 	req->headers++;
 
 	return 0;	
@@ -8327,9 +8327,9 @@
 	if (!(req->data = ast_str_create(SIP_MIN_PACKET)))
 		return -1;
 	req->method = sipmethod;
-	req->header[0] = req->data->str;
+	req->header[0] = 0;
 	ast_str_set(&req->data, 0, "%s %s SIP/2.0\r\n", sip_methods[sipmethod].text, recip);
-	req->len = strlen(req->header[0]);
+	req->len = req->data->used;
 	req->headers++;
 	return 0;
 }
@@ -20258,7 +20258,7 @@
 
 	/* Get Method and Cseq */
 	cseq = get_header(req, "Cseq");
-	cmd = req->header[0];
+	cmd = req->data->str;
 
 	/* Must have Cseq */
 	if (ast_strlen_zero(cmd) || ast_strlen_zero(cseq)) {
@@ -20277,8 +20277,8 @@
 	}
 	/* Get the command XXX */
 
-	cmd = req->rlPart1;
-	e = req->rlPart2;
+	cmd = req->data->str + req->rlPart1;
+	e = req->data->str + req->rlPart2;
 
 	/* Save useragent of the client */
 	useragent = get_header(req, "User-Agent");




More information about the svn-commits mailing list