[Asterisk-cvs] asterisk/channels Makefile,1.12,1.13 chan_iax.c,1.14,1.15 chan_oss.c,1.8,1.9 chan_skinny.c,1.20,1.21 iax2-parser.c,1.11,1.12

markster at lists.digium.com markster at lists.digium.com
Mon Oct 20 21:31:28 CDT 2003


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

Modified Files:
	Makefile chan_iax.c chan_oss.c chan_skinny.c iax2-parser.c 
Log Message:
FreeBSD patch, take 2


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/Makefile,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Makefile	16 Oct 2003 21:11:29 -0000	1.12
+++ Makefile	21 Oct 2003 02:57:29 -0000	1.13
@@ -91,12 +91,13 @@
 
 chan_oss.o: chan_oss.c  busy.h ringtone.h
 
+ifeq (${OSARCH},OpenBSD)
+chan_oss.so: chan_oss.o
+	$(CC) -shared -Xlinker -x -o $@ chan_oss.o -lossaudio
+endif
+
 chan_iax2.so: chan_iax2.o iax2-parser.o
-ifeq (${OSARCH},Linux)
 	$(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o
-else
-	$(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o -lossaudio
-endif
 
 chan_zap.o: $(CHANZAP)
 	$(CC) -c $(CFLAGS) -o chan_zap.o $(CHANZAP)

Index: chan_iax.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- chan_iax.c	16 Oct 2003 21:11:29 -0000	1.14
+++ chan_iax.c	21 Oct 2003 02:57:29 -0000	1.15
@@ -532,7 +532,7 @@
 	(rx ? "Rx" : "Tx"),
 	retries, ntohs(fh->seqno), class, subclass);
 		fprintf(stderr,
-"   Timestamp: %05dms  Callno: %5.5d  DCall: %5.5d [%s:%d]\n",
+"   Timestamp: %05ldms  Callno: %5.5d  DCall: %5.5d [%s:%d]\n",
 	ntohl(fh->ts),
 	(short)(ntohs(fh->callno) & ~AST_FLAG_FULL), (short) ntohs(fh->dcallno),
 		inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));

Index: chan_oss.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_oss.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- chan_oss.c	16 Oct 2003 21:11:30 -0000	1.8
+++ chan_oss.c	21 Oct 2003 02:57:29 -0000	1.9
@@ -35,6 +35,8 @@
 #include <stdio.h>
 #ifdef __linux
 #include <linux/soundcard.h>
+#elif defined(__FreeBSD__)
+#include <machine/soundcard.h>
 #else
 #include <soundcard.h>
 #endif

Index: chan_skinny.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_skinny.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- chan_skinny.c	16 Oct 2003 21:11:30 -0000	1.20
+++ chan_skinny.c	21 Oct 2003 02:57:29 -0000	1.21
@@ -863,6 +863,7 @@
 	transmit_response(s, req);
 }
 
+#if 0
 static void transmit_selectsoftkeys(struct skinnysession *s, int instance, int callid, int softkey)
 {
 	skinny_req *req;
@@ -881,6 +882,7 @@
 	req->data.selectsoftkey.softKeySetIndex = softkey;
 	transmit_response(s, req);
 }
+#endif
 
 static void transmit_lamp_indication(struct skinnysession *s, int instance, int indication)
 {
@@ -2318,7 +2320,7 @@
 
 	for (;;) {
 		sinlen = sizeof(sin);
-		as = accept(skinnysock, &sin, &sinlen);
+		as = accept(skinnysock, (struct sockaddr *)&sin, &sinlen);
 		if (as < 0) {
 			ast_log(LOG_NOTICE, "Accept returned -1: %s\n", strerror(errno));
 			continue;
@@ -2393,7 +2395,7 @@
 {
 
 	/* If we're supposed to be stopped -- stay stopped */
-	if (monitor_thread == -2)
+	if (monitor_thread == (pthread_t)-2)
 		return 0;
 	if (ast_mutex_lock(&monlock)) {
 		ast_log(LOG_WARNING, "Unable to lock monitor\n");

Index: iax2-parser.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/iax2-parser.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- iax2-parser.c	16 Oct 2003 21:11:30 -0000	1.11
+++ iax2-parser.c	21 Oct 2003 02:57:29 -0000	1.12
@@ -64,7 +64,7 @@
 static void dump_int(char *output, int maxlen, void *value, int len)
 {
 	if (len == sizeof(unsigned int))
-		snprintf(output, maxlen, "%d", ntohl(*((unsigned int *)value)));
+		snprintf(output, maxlen, "%ld", ntohl(*((unsigned int *)value)));
 	else
 		snprintf(output, maxlen, "Invalid INT");
 }
@@ -287,7 +287,7 @@
 	retries, fh->oseqno, fh->iseqno, class, subclass);
 	outputf(tmp);
 snprintf(tmp, sizeof(tmp), 
-"   Timestamp: %05dms  SCall: %5.5d  DCall: %5.5d [%s:%d]\n",
+"   Timestamp: %05ldms  SCall: %5.5d  DCall: %5.5d [%s:%d]\n",
 	ntohl(fh->ts),
 	ntohs(fh->scallno) & ~IAX_FLAG_FULL, ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS,
 		inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));




More information about the svn-commits mailing list