[svn-commits] dvossel: trunk r326544 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 6 12:39:40 CDT 2011


Author: dvossel
Date: Wed Jul  6 12:39:36 2011
New Revision: 326544

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=326544
Log:
Fixes newlines from being stripped from out of dialog sip MESSAGES.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=326544&r1=326543&r2=326544
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jul  6 12:39:36 2011
@@ -16079,7 +16079,11 @@
 		return;
 	}
 
-	if (get_msg_text2(&buf, req, FALSE)) {
+	/* If this is an out of dialog msg, add back newlines, otherwise strip the new lines.
+	 * In dialog msg's newlines are stripped to preserve the behavior of how Asterisk has worked
+	 * in the past.  If it is found later that new lines can be added into in dialog msgs as well,
+	 * then change this. */
+	if (get_msg_text2(&buf, req, p->owner ? FALSE : TRUE)) {
 		ast_log(LOG_WARNING, "Unable to retrieve text from %s\n", p->callid);
 		transmit_response(p, "202 Accepted", req);
 		if (!p->owner)




More information about the svn-commits mailing list