[asterisk-commits] rizzo: branch rizzo/astobj2 r48540 -
/team/rizzo/astobj2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Dec 17 01:47:30 MST 2006
Author: rizzo
Date: Sun Dec 17 02:47:30 2006
New Revision: 48540
URL: http://svn.digium.com/view/asterisk?view=rev&rev=48540
Log:
actually remove unused fields in sip_msg_out;
add a debugging message in determine_firstline_parts(),
apparently "fromuser" does not check for the presence
of reserved characters (e.g. spaces) and does not
escape them as required in SIP URIs (sec.25 of RFC3261)
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=48540&r1=48539&r2=48540
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Sun Dec 17 02:47:30 2006
@@ -645,17 +645,10 @@
* 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 */
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 */
- char *_header[SIP_MAX_HEADERS];
- char *_line[SIP_MAX_LINES];
char data[SIP_MAX_PACKET];
};
@@ -6815,6 +6808,7 @@
/*! \brief Parse first line of incoming SIP request */
static int determine_firstline_parts(struct sip_request *req)
{
+ char *orig = ast_strdupa(req->header[0]);
char *e = ast_skip_blanks(req->header[0]); /* there shouldn't be any */
if (!*e)
@@ -6846,7 +6840,7 @@
*e++ = '\0';
e = ast_skip_blanks(e);
if (strcasecmp(e, "SIP/2.0") ) {
- ast_log(LOG_WARNING, "Bad request protocol %s\n", e);
+ ast_log(LOG_WARNING, "Bad request protocol %s\n", orig);
return -1;
}
}
More information about the asterisk-commits
mailing list