[Asterisk-cvs] asterisk/channels Makefile,1.10,1.11 chan_iax.c,1.12,1.13 chan_oss.c,1.6,1.7 chan_skinny.c,1.18,1.19 iax2-parser.c,1.9,1.10
markster at lists.digium.com
markster at lists.digium.com
Thu Oct 16 05:18:02 CDT 2003
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv8710/channels
Modified Files:
Makefile chan_iax.c chan_oss.c chan_skinny.c iax2-parser.c
Log Message:
Sane FreeBSD patch
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/Makefile,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Makefile 11 Sep 2003 19:45:43 -0000 1.10
+++ Makefile 16 Oct 2003 10:44:04 -0000 1.11
@@ -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.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- chan_iax.c 16 Aug 2003 05:10:35 -0000 1.12
+++ chan_iax.c 16 Oct 2003 10:44:04 -0000 1.13
@@ -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.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- chan_oss.c 13 Aug 2003 15:25:16 -0000 1.6
+++ chan_oss.c 16 Oct 2003 10:44:04 -0000 1.7
@@ -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.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- chan_skinny.c 30 Sep 2003 10:58:34 -0000 1.18
+++ chan_skinny.c 16 Oct 2003 10:44:04 -0000 1.19
@@ -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.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- iax2-parser.c 1 Oct 2003 22:59:06 -0000 1.9
+++ iax2-parser.c 16 Oct 2003 10:44:04 -0000 1.10
@@ -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