[Asterisk-cvs] asterisk/channels Makefile, 1.59, 1.60 chan_sip.c, 1.484, 1.485

markster at lists.digium.com markster at lists.digium.com
Tue Aug 31 12:29:35 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv32361/channels

Modified Files:
	Makefile chan_sip.c 
Log Message:
More Asterisk sparc patches (courtesy Belgarath)


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/Makefile,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- Makefile	31 Aug 2004 13:32:11 -0000	1.59
+++ Makefile	31 Aug 2004 16:33:00 -0000	1.60
@@ -7,11 +7,15 @@
 #
 # Mark Spencer <markster at linux-support.net>
 #
+# Edited By Belgarath <> Aug 28 2004
+# Added bare bones ultrasparc-linux support.
+#
 # This program is free software, distributed under the terms of
 # the GNU General Public License
 #
 
 OSARCH=$(shell uname -s)
+PROC=$(shell uname -m)
 
 USE_MYSQL_FRIENDS=0
 USE_SIP_MYSQL_FRIENDS=0
@@ -45,6 +49,12 @@
 PTLIB=-lpt_linux_x86_r
 H323LIB=-lh323_linux_x86_r
 CHANH323LIB=-ldl
+
+ifeq ($(PROC),sparc64)
+PROC=ultrasparc
+CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+endif
+
 endif
 ifeq (${OSARCH},FreeBSD)
 PTLIB=-lpt_FreeBSD_x86_r

Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.484
retrieving revision 1.485
diff -u -d -r1.484 -r1.485
--- chan_sip.c	31 Aug 2004 13:49:18 -0000	1.484
+++ chan_sip.c	31 Aug 2004 16:33:00 -0000	1.485
@@ -3685,21 +3685,19 @@
 	} else {
 		snprintf(invite, sizeof(invite), "sip:%s", p->tohost);
 	}
+	if (!ast_strlen_zero(p->extraparams)) {
+		strncat(invite, ";", sizeof(invite) - strlen(invite));
+		strncat(invite, p->extraparams, sizeof(invite) - strlen(invite));
+	}
 	strncpy(p->uri, invite, sizeof(p->uri) - 1);
 	/* If there is a VXML URL append it to the SIP URL */
 	if (vxml_url)
 	{
-		if (strlen(p->extraparams))
-			snprintf(to, sizeof(to), "<%s;%s>;%s", invite, p->extraparams, vxml_url);
-		else
-			snprintf(to, sizeof(to), "<%s>;%s", invite, vxml_url);
+		snprintf(to, sizeof(to), "<%s>;%s", invite, vxml_url);
 	}
 	else
 	{
-		if (strlen(p->extraparams))
-			snprintf(to, sizeof(to), "<%s;%s>", invite, p->extraparams);
-		else
-			snprintf(to, sizeof(to), "<%s>", invite);
+		snprintf(to, sizeof(to), "<%s>", invite);
 	}
 	memset(req, 0, sizeof(struct sip_request));
 	init_req(req, cmd, invite);




More information about the svn-commits mailing list