mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
FreeBSD patch, take 2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -91,13 +91,14 @@ ringtone.h: gentone
|
||||
|
||||
chan_oss.o: chan_oss.c busy.h ringtone.h
|
||||
|
||||
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
|
||||
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
|
||||
$(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o
|
||||
|
||||
chan_zap.o: $(CHANZAP)
|
||||
$(CC) -c $(CFLAGS) -o chan_zap.o $(CHANZAP)
|
||||
|
||||
|
@@ -532,7 +532,7 @@ static void showframe(struct ast_iax_frame *f, struct ast_iax_full_hdr *fhi, int
|
||||
(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));
|
||||
|
@@ -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
|
||||
|
@@ -863,6 +863,7 @@ static void transmit_tone(struct skinnysession *s, int tone)
|
||||
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 @@ static void transmit_selectsoftkeys(struct skinnysession *s, int instance, int c
|
||||
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 @@ static void *accept_thread(void *ignore)
|
||||
|
||||
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 @@ static int restart_monitor(void)
|
||||
{
|
||||
|
||||
/* 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");
|
||||
|
@@ -64,7 +64,7 @@ static void dump_string(char *output, int maxlen, void *value, int len)
|
||||
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 @@ snprintf(tmp, sizeof(tmp),
|
||||
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));
|
||||
|
Reference in New Issue
Block a user