[asterisk-commits] rizzo: branch rizzo/astobj2 r48536 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Dec 17 00:55:24 MST 2006


Author: rizzo
Date: Sun Dec 17 01:55:24 2006
New Revision: 48536

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48536
Log:
+ initialize_initreq() looked at SIP_PKT_DEBUG to print a diagnostic
  message, but the flag could not be set on the packet.
  If we want to print stuff, we need to call sip_debug_test_addr(&p->sa)

  Trunk candidate.

+ mark some unused fields of sip_msg_out


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=48536&r1=48535&r2=48536
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Sun Dec 17 01:55:24 2006
@@ -642,17 +642,18 @@
  * It makes sense to use a different data structure than the one for incoming
  * packets as the internal format is not the same (e.g. no '\0' between
  * the various lines).
+ * XXX fields starting with _ are unused
  */
 struct sip_msg_out {
-	char *rlPart1; 	        /*!< SIP Method Name or "SIP/2.0" protocol version */
-	char *rlPart2; 	        /*!< The Request URI or Response Status */
+	char *_rlPart1;         /*!< SIP Method Name or "SIP/2.0" protocol version */
+	char *_rlPart2;         /*!< The Request URI or Response Status */
 	int len;                /*!< Length */
 	int headers;            /*!< # of SIP Headers */
 	int method;             /*!< Method of this request */
 	int lines;              /*!< Body Content */
-	unsigned int flags;     /*!< SIP_PKT Flags for this packet */
-	unsigned int sdp_start; /*!< the line number where the SDP begins */
-	unsigned int sdp_end;   /*!< the line number where the SDP ends */
+	unsigned int _flags;     /*!< SIP_PKT Flags for this packet */
+	unsigned int _sdp_start; /*!< the line number where the SDP begins */
+	unsigned int _sdp_end;   /*!< the line number where the SDP ends */
 	char *header[SIP_MAX_HEADERS];
 	char *line[SIP_MAX_LINES];
 	char data[SIP_MAX_PACKET];
@@ -1836,7 +1837,10 @@
 	}
 	/* Use this as the basis */
 	parse_copy(&p->initreq, req);	/* XXX check this */
-	if (ast_test_flag(req, SIP_PKT_DEBUG))
+	/* req has no SIP_PKT_DEBUG flag. If we want to print something,
+	 * we need to look at sip_debug_test_addr(p->sa)
+	 */
+	if (sip_debug_test_addr(&p->sa))
 		ast_verbose("Initreq: %d headers, %d lines\n", p->initreq.headers, p->initreq.lines);
 }
 



More information about the asterisk-commits mailing list