[asterisk-commits] branch group/autoconf_and_menuselect r18496 -
/team/group/autoconf_and_menuse...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Apr 8 12:53:16 MST 2006
Author: russell
Date: Sat Apr 8 14:53:14 2006
New Revision: 18496
URL: http://svn.digium.com/view/asterisk?rev=18496&view=rev
Log:
get rid of setting ZAPTEL_OPTIMIZATIONS in the main Makefile and convert uses
of it to use HAVE_ZAPTEL from autoconf
Modified:
team/group/autoconf_and_menuselect/Makefile
team/group/autoconf_and_menuselect/channel.c
team/group/autoconf_and_menuselect/file.c
Modified: team/group/autoconf_and_menuselect/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/Makefile?rev=18496&r1=18495&r2=18496&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/Makefile (original)
+++ team/group/autoconf_and_menuselect/Makefile Sat Apr 8 14:53:14 2006
@@ -307,14 +307,6 @@
LIBS+=-lpthread -lncurses -lm -lresolv
ASTSBINDIR=$(MODULES_DIR)
endif
-
-ifndef WITHOUT_ZAPTEL
-
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
- ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS
-endif
-
-endif # WITHOUT_ZAPTEL
LIBEDIT=editline/libedit.a
Modified: team/group/autoconf_and_menuselect/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channel.c?rev=18496&r1=18495&r2=18496&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channel.c (original)
+++ team/group/autoconf_and_menuselect/channel.c Sat Apr 8 14:53:14 2006
@@ -32,7 +32,9 @@
#include <unistd.h>
#include <math.h> /* For PI */
-#ifdef ZAPTEL_OPTIMIZATIONS
+#include "asterisk.h"
+
+#ifdef HAVE_ZAPTEL
#include <sys/ioctl.h>
#ifdef __linux__
#include <linux/zaptel.h>
@@ -43,8 +45,6 @@
#error "You need newer zaptel! Please cvs update zaptel"
#endif
#endif
-
-#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -605,7 +605,7 @@
for (x=0; x<AST_MAX_FDS - 2; x++)
tmp->fds[x] = -1;
-#ifdef ZAPTEL_OPTIMIZATIONS
+#ifdef HAVE_ZAPTEL
tmp->timingfd = open("/dev/zap/timer", O_RDWR);
if (tmp->timingfd > -1) {
/* Check if timing interface supports new
@@ -713,7 +713,7 @@
if (write(chan->alertpipe[1], &blah, sizeof(blah)) != sizeof(blah))
ast_log(LOG_WARNING, "Unable to write to alert pipe on %s, frametype/subclass %d/%d (qlen = %d): %s!\n",
chan->name, f->frametype, f->subclass, qlen, strerror(errno));
-#ifdef ZAPTEL_OPTIMIZATIONS
+#ifdef HAVE_ZAPTEL
} else if (chan->timingfd > -1) {
ioctl(chan->timingfd, ZT_TIMERPING, &blah);
#endif
@@ -1675,7 +1675,7 @@
int ast_settimeout(struct ast_channel *c, int samples, int (*func)(void *data), void *data)
{
int res = -1;
-#ifdef ZAPTEL_OPTIMIZATIONS
+#ifdef HAVE_ZAPTEL
if (c->timingfd > -1) {
if (!func) {
samples = 0;
@@ -1752,7 +1752,7 @@
struct ast_frame *f = NULL;
int blah;
int prestate;
-#ifdef ZAPTEL_OPTIMIZATIONS
+#ifdef HAVE_ZAPTEL
int (*func)(void *);
void *data;
int res;
@@ -1792,7 +1792,7 @@
if (chan->alertpipe[0] > -1) {
read(chan->alertpipe[0], &blah, sizeof(blah));
}
-#ifdef ZAPTEL_OPTIMIZATIONS
+#ifdef HAVE_ZAPTEL
if (chan->timingfd > -1 && chan->fdno == AST_TIMING_FD && ast_test_flag(chan, AST_FLAG_EXCEPTION)) {
ast_clear_flag(chan, AST_FLAG_EXCEPTION);
blah = -1;
Modified: team/group/autoconf_and_menuselect/file.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/file.c?rev=18496&r1=18495&r2=18496&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/file.c (original)
+++ team/group/autoconf_and_menuselect/file.c Sat Apr 8 14:53:14 2006
@@ -626,14 +626,14 @@
if (fr)
ast_log(LOG_WARNING, "Failed to write frame\n");
s->owner->streamid = -1;
-#ifdef ZAPTEL_OPTIMIZATIONS
+#ifdef HAVE_ZAPTEL
ast_settimeout(s->owner, 0, NULL, NULL);
#endif
return 0;
}
}
if (whennext != s->lasttimeout) {
-#ifdef ZAPTEL_OPTIMIZATIONS
+#ifdef HAVE_ZAPTEL
if (s->owner->timingfd > -1)
ast_settimeout(s->owner, whennext, ast_readaudio_callback, s);
else
@@ -718,7 +718,7 @@
if (f->owner->streamid > -1)
ast_sched_del(f->owner->sched, f->owner->streamid);
f->owner->streamid = -1;
-#ifdef ZAPTEL_OPTIMIZATIONS
+#ifdef HAVE_ZAPTEL
ast_settimeout(f->owner, 0, NULL, NULL);
#endif
} else {
More information about the asterisk-commits
mailing list