[svn-commits] oej: branch oej/darjeeling-prack-1.8 r369462 - /team/oej/darjeeling-prack-1.8...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 28 07:01:24 CDT 2012


Author: oej
Date: Thu Jun 28 07:01:21 2012
New Revision: 369462

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369462
Log:
Required work. Literally.

Modified:
    team/oej/darjeeling-prack-1.8/channels/chan_sip.c

Modified: team/oej/darjeeling-prack-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/channels/chan_sip.c?view=diff&rev=369462&r1=369461&r2=369462
==============================================================================
--- team/oej/darjeeling-prack-1.8/channels/chan_sip.c (original)
+++ team/oej/darjeeling-prack-1.8/channels/chan_sip.c Thu Jun 28 07:01:21 2012
@@ -4164,17 +4164,23 @@
 static void add_required_respheader(struct sip_request *req)
 {
 	if (req->reqsipoptions) {
-		char buf[SIPBUFSIZE];
+		char buf[SIPBUFSIZE] = "";
 		int i;
+
+		ast_debug(2, "=!=!=!=!= Plenty of required options for this message \n");
 
 		for (i = 0; i < ARRAY_LEN(sip_options); i++) {
 			if (req->reqsipoptions & sip_options[i].id) {
-				strncat(buf, ", ", sizeof(buf));
+				if (buf[0] != '\0') {
+					strncat(buf, ", ", sizeof(buf));
+				}
 				strncat(buf, sip_options[i].text, sizeof(buf));
 				ast_debug(3, "Found required response SIP option: %s\n", sip_options[i].text);
 			}
 		}
 		add_header(req, "Required", buf);
+	} else {
+		ast_debug(2, "=!=!=!=!= No required options for this message \n");
 	}
 
 }




More information about the svn-commits mailing list