[asterisk-commits] mmichelson: branch mmichelson/issue14220 r169442 - /team/mmichelson/issue1422...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 19 15:56:22 CST 2009


Author: mmichelson
Date: Mon Jan 19 15:56:22 2009
New Revision: 169442

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=169442
Log:
Make fixes as suggested by Kevin on reviewboard


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=169442&r1=169441&r2=169442
==============================================================================
--- team/mmichelson/issue14220/channels/chan_sip.c (original)
+++ team/mmichelson/issue14220/channels/chan_sip.c Mon Jan 19 15:56:22 2009
@@ -7113,9 +7113,9 @@
 				continue;
 			}
 			if (sipdebug) {
-				ast_debug(4, "%7s %2d [%3zu]: %s\n",
+				ast_debug(4, "%7s %2d [%3d]: %s\n",
 					  req->headers < 0 ? "Header" : "Body",
-					  i, strlen(previous_header), previous_header);
+					  i, (int) strlen(previous_header), previous_header);
 			}
 			if (ast_strlen_zero(previous_header) && req->headers < 0) {
 				req->headers = i;	/* record number of header lines */
@@ -7150,9 +7150,9 @@
 	previous_header = req->data->str + dst[i];
 	if ((i < lim) && !ast_strlen_zero(previous_header)) {
 		if (sipdebug) {
-			ast_debug(4, "%7s %2d [%3zu]: %s\n",
+			ast_debug(4, "%7s %2d [%3d]: %s\n",
 				  req->headers < 0 ? "Header" : "Body",
-				  i, strlen(previous_header), previous_header );
+				  i, (int) strlen(previous_header), previous_header );
 		}
 		i++;
 	}
@@ -7163,8 +7163,8 @@
 	} else {			/* no body */
 		req->headers = i;
 		req->lines = 0;
-		/*XXX Should be all right...*/
-		req->line[0] = 0;
+		/* req->data->used will be a NULL byte */
+		req->line[0] = req->data->used;
 	}
 
 	if (*c) {
@@ -9403,10 +9403,6 @@
 		
 	memcpy(dst->data->str, src->data->str, src->data->used + 1);
 	dst->data->used = src->data->used;
-	memcpy(dst->header, src->header, sizeof(dst->header));
-	memcpy(dst->line, src->line, sizeof(dst->line));
-	dst->rlPart1 = src->rlPart1;
-	dst->rlPart2 = src->rlPart2;
 }
 
 /*! \brief Used for 200 OK and 183 early media 
@@ -20272,7 +20268,7 @@
 
 	/* Get Method and Cseq */
 	cseq = get_header(req, "Cseq");
-	cmd = req->data->str;
+	cmd = REQ_OFFSET_TO_STR(req, header[0]);
 
 	/* Must have Cseq */
 	if (ast_strlen_zero(cmd) || ast_strlen_zero(cseq)) {




More information about the asterisk-commits mailing list