[zaptel-commits] sruffell: branch sruffell/voicebus r3887 - in /team/sruffell/voicebus: ./ bui...

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Wed Feb 27 15:27:47 CST 2008


Author: sruffell
Date: Wed Feb 27 15:27:46 2008
New Revision: 3887

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3887
Log:
Merging changes in from the trunk.


Added:
    team/sruffell/voicebus/kernel/   (props changed)
      - copied from r3885, branches/1.4/kernel/
    team/sruffell/voicebus/kernel/datamods/
      - copied from r3885, branches/1.4/kernel/datamods/
    team/sruffell/voicebus/kernel/hpec/   (props changed)
      - copied from r3885, branches/1.4/kernel/hpec/
    team/sruffell/voicebus/kernel/voicebus.c
      - copied unchanged from r3884, team/sruffell/voicebus/voicebus.c
    team/sruffell/voicebus/kernel/voicebus.h
      - copied unchanged from r3884, team/sruffell/voicebus/voicebus.h
    team/sruffell/voicebus/kernel/wct4xxp/   (props changed)
      - copied from r3885, branches/1.4/kernel/wct4xxp/
    team/sruffell/voicebus/kernel/wctc4xxp/   (props changed)
      - copied from r3885, branches/1.4/kernel/wctc4xxp/
    team/sruffell/voicebus/kernel/wctdm24xxp/   (props changed)
      - copied from r3885, branches/1.4/kernel/wctdm24xxp/
    team/sruffell/voicebus/kernel/wcte12xp/   (props changed)
      - copied from r3885, branches/1.4/kernel/wcte12xp/
    team/sruffell/voicebus/kernel/xpp/   (props changed)
      - copied from r3885, branches/1.4/kernel/xpp/
    team/sruffell/voicebus/kernel/xpp/firmwares/
      - copied from r3885, branches/1.4/kernel/xpp/firmwares/
    team/sruffell/voicebus/kernel/xpp/utils/   (props changed)
      - copied from r3885, branches/1.4/kernel/xpp/utils/
    team/sruffell/voicebus/kernel/xpp/utils/zconf/
      - copied from r3885, branches/1.4/kernel/xpp/utils/zconf/
    team/sruffell/voicebus/kernel/xpp/utils/zconf/Zaptel/
      - copied from r3885, branches/1.4/kernel/xpp/utils/zconf/Zaptel/
    team/sruffell/voicebus/kernel/xpp/utils/zconf/Zaptel/Config/
      - copied from r3885, branches/1.4/kernel/xpp/utils/zconf/Zaptel/Config/
    team/sruffell/voicebus/kernel/xpp/utils/zconf/Zaptel/Hardware/
      - copied from r3885, branches/1.4/kernel/xpp/utils/zconf/Zaptel/Hardware/
    team/sruffell/voicebus/kernel/xpp/utils/zconf/Zaptel/Xpp/
      - copied from r3885, branches/1.4/kernel/xpp/utils/zconf/Zaptel/Xpp/
Removed:
    team/sruffell/voicebus/Kbuild
    team/sruffell/voicebus/adt_lec.c
    team/sruffell/voicebus/adt_lec.h
    team/sruffell/voicebus/arith.h
    team/sruffell/voicebus/biquad.h
    team/sruffell/voicebus/datamods/
    team/sruffell/voicebus/digits.h
    team/sruffell/voicebus/ecdis.h
    team/sruffell/voicebus/fasthdlc.h
    team/sruffell/voicebus/fir.h
    team/sruffell/voicebus/hpec/
    team/sruffell/voicebus/jpah.h
    team/sruffell/voicebus/kb1ec.h
    team/sruffell/voicebus/kb1ec_const.h
    team/sruffell/voicebus/makefw.c
    team/sruffell/voicebus/mg2ec.h
    team/sruffell/voicebus/mg2ec_const.h
    team/sruffell/voicebus/pciradio.c
    team/sruffell/voicebus/pciradio.rbt
    team/sruffell/voicebus/proslic.h
    team/sruffell/voicebus/sec-2.h
    team/sruffell/voicebus/sec.h
    team/sruffell/voicebus/tor2-hw.h
    team/sruffell/voicebus/tor2.c
    team/sruffell/voicebus/torisa.c
    team/sruffell/voicebus/tormenta2.rbt
    team/sruffell/voicebus/voicebus.c
    team/sruffell/voicebus/voicebus.h
    team/sruffell/voicebus/wcfxo.c
    team/sruffell/voicebus/wct1xxp.c
    team/sruffell/voicebus/wct4xxp/
    team/sruffell/voicebus/wctc4xxp/
    team/sruffell/voicebus/wctdm.c
    team/sruffell/voicebus/wctdm.h
    team/sruffell/voicebus/wcte11xp.c
    team/sruffell/voicebus/wcusb.c
    team/sruffell/voicebus/wcusb.h
    team/sruffell/voicebus/xpp/
    team/sruffell/voicebus/zaptel-base.c
    team/sruffell/voicebus/zaptel.h
    team/sruffell/voicebus/zconfig.h
    team/sruffell/voicebus/ztd-eth.c
    team/sruffell/voicebus/ztd-loc.c
    team/sruffell/voicebus/ztdummy.c
    team/sruffell/voicebus/ztdummy.h
    team/sruffell/voicebus/ztdynamic.c
    team/sruffell/voicebus/zttranscode.c
Modified:
    team/sruffell/voicebus/   (props changed)
    team/sruffell/voicebus/Makefile
    team/sruffell/voicebus/README
    team/sruffell/voicebus/build_tools/test_kernel_git
    team/sruffell/voicebus/configure
    team/sruffell/voicebus/configure.ac
    team/sruffell/voicebus/firmware/Makefile
    team/sruffell/voicebus/fxotune.c
    team/sruffell/voicebus/fxotune.h
    team/sruffell/voicebus/fxstest.c
    team/sruffell/voicebus/hdlcgen.c
    team/sruffell/voicebus/hdlcstress.c
    team/sruffell/voicebus/hdlctest.c
    team/sruffell/voicebus/hdlcverify.c
    team/sruffell/voicebus/install_prereq
    team/sruffell/voicebus/live_zap
    team/sruffell/voicebus/patgen.c
    team/sruffell/voicebus/patlooptest.c
    team/sruffell/voicebus/pattest.c
    team/sruffell/voicebus/ppp/zaptel.c
    team/sruffell/voicebus/sethdlc-new.c
    team/sruffell/voicebus/sethdlc.c
    team/sruffell/voicebus/timertest.c
    team/sruffell/voicebus/tonezone.c
    team/sruffell/voicebus/tonezone.h
    team/sruffell/voicebus/torisatool.c
    team/sruffell/voicebus/ztcfg-dude.c
    team/sruffell/voicebus/ztcfg.c
    team/sruffell/voicebus/ztdiag.c
    team/sruffell/voicebus/ztmonitor.c
    team/sruffell/voicebus/ztscan.c
    team/sruffell/voicebus/zttool.c

Propchange: team/sruffell/voicebus/
------------------------------------------------------------------------------
--- branch-1.2-blocked (original)
+++ branch-1.2-blocked Wed Feb 27 15:27:46 2008
@@ -1,1 +1,1 @@
-/branches/1.2:917,937,1073,1206,1613,2018,2434,2583,2668,2750,2789,2868,2871,2878,3083,3098-3099,3201,3509,3645
+/branches/1.2:917,937,1073,1206,1613,2018,2434,2583,2668,2750,2789,2868,2871,2878,3083,3098-3099,3201,3509,3645,3833,3847

Propchange: team/sruffell/voicebus/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/sruffell/voicebus/
------------------------------------------------------------------------------
--- svn:externals (original)
+++ svn:externals Wed Feb 27 15:27:46 2008
@@ -1,2 +1,1 @@
 menuselect https://origsvn.digium.com/svn/menuselect/branches/1.0
-oct612x http://svn.digium.com/svn/octasic_api/oct612x/tags/PR49-00/software

Propchange: team/sruffell/voicebus/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Feb 27 15:27:46 2008
@@ -1,1 +1,1 @@
-/branches/1.4:1-3783
+/branches/1.4:1-3886

Modified: team/sruffell/voicebus/Makefile
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/Makefile?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/Makefile (original)
+++ team/sruffell/voicebus/Makefile Wed Feb 27 15:27:46 2008
@@ -55,25 +55,6 @@
     UDEVRULES=yes
   endif
   HOTPLUG_FIRMWARE:=$(shell if grep CONFIG_FW_LOADER $(KINCLUDES)/linux/autoconf.h | grep -q undef; then echo "no"; else echo "yes"; fi)
-else
-  # Hotplug firmware loading is not supported on any other version then 2.6
-  HOTPLUG_FIRMWARE:=no
-endif
-
-ifeq ($(HOTPLUG_FIRMWARE),yes)
-  CFLAGS+=-DHOTPLUG_FIRMWARE
-endif
-
-ifeq ($(ARCH),i386)
-ifneq ($(wildcard $(PWD)/hpec/hpec_x86_32.o_shipped),)
-HPEC_PRESENT=yes
-endif
-endif
-
-ifeq ($(ARCH),x86_64)
-ifneq ($(wildcard $(PWD)/hpec/hpec_x86_64.o_shipped),)
-HPEC_PRESENT=yes
-endif
 endif
 
 # If the file .zaptel.makeopts is present in your home directory, you can
@@ -105,10 +86,10 @@
   BUILD_XPP:=yes
 endif
 
-SUBDIRS_UTILS_ALL:= xpp/utils ppp
+SUBDIRS_UTILS_ALL:= kernel/xpp/utils ppp
 SUBDIRS_UTILS	:=
 ifeq ($(BUILD_XPP),yes)
-  SUBDIRS_UTILS	+= xpp/utils
+  SUBDIRS_UTILS	+= kernel/xpp/utils
 endif
 #SUBDIRS_UTILS	+= ppp
 
@@ -122,6 +103,8 @@
 
 MOD_DESTDIR:=zaptel
 
+KERN_DIR:=kernel
+
 #NOTE NOTE NOTE
 #
 # all variables set before the include of Makefile.kernel26 are needed by the 2.6 kernel module build process
@@ -137,17 +120,11 @@
 KBUILD_OBJ_M=$(BUILD_TOPDIR_MODULES:%=%.o) $(BUILD_SUBDIR_MODULES:%=%/)
 
 ifeq ($(BUILDVER),linux24)
-  INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=%.o)
+  INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=$(KERN_DIR)/%.o)
   INSTALL_MODULES+=$(foreach mod,$(BUILD_SUBDIR_MODULES),$(mod)/$(mod).o)
-  ALL_MODULES:=$(TOPDIR_MODULES:%=%.o)
-  ALL_MODULES+=$(SUBDIR_MODULES:%=%/%.o)
-else
-  INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=%.ko)
-  INSTALL_MODULES+=$(foreach mod,$(filter-out xpp,$(BUILD_SUBDIR_MODULES)),$(mod)/$(mod).ko)
-  ifneq ($(filter xpp,$(BUILD_SUBDIR_MODULES)),)
-  INSTALL_MODULES+=$(patsubst %,xpp/%.ko,xpp_usb xpd_fxo xpd_fxs xpp)
-  endif
-
+  ALL_MODULES:=$(TOPDIR_MODULES:%=$(KERN_DIR)/%.o)
+  ALL_MODULES+=$(SUBDIR_MODULES:%=$(KERN_DIR)/%/%.o)
+else
   ALL_MODULES:=$(TOPDIR_MODULES:%=%.ko)
   ALL_MODULES+=$(foreach mod,$(filter-out xpp,$(SUBDIR_MODULES)),$(mod)/$(mod).ko)
   ALL_MODULES+=$(patsubst %,xpp/%.ko,xpp_usb xpd_fxo xpd_fxs xpp)
@@ -186,8 +163,13 @@
 
 KFLAGS+=-DSTANDALONE_ZAPATA
 CFLAGS+=-DSTANDALONE_ZAPATA
-KMAKE  = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) \
+ifeq ($(BUILDVER),linux24)
+KMAKE	= $(MAKE) -C kernel HOTPLUG_FIRMWARE=no \
+  BUILD_TOPDIR_MODULES="$(BUILD_TOPDIR_MODULES)" BUILD_SUBDIR_MODULES="$(BUILD_SUBDIR_MODULES)"
+else
+KMAKE  = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)/kernel \
   HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) KBUILD_OBJ_M="$(KBUILD_OBJ_M)"
+endif
 KMAKE_INST = $(KMAKE) \
   INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=misc modules_install
 
@@ -293,24 +275,7 @@
 
 modules: prereq
 	@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
-ifeq ($(BUILDVER),linux26)
 	$(KMAKE) modules
-else
-modules: $(INSTALL_MODULES)
-endif
-
-ifeq ($(HPEC_PRESENT),yes)
-ifeq ($(ARCH),i386)
-ZAPTEL_HPEC:=hpec/hpec_x86_32.o_shipped
-endif
-
-ifeq ($(ARCH),x86_64)
-ZAPTEL_HPEC:=hpec/hpec_x86_64.o_shipped
-endif
-
-KFLAGS+=-DECHO_CAN_HPEC -I$(PWD)/hpec
-zaptel-base.o: hpec/hpec_zaptel.h hpec/hpec_user.h
-endif
 
 version.h:
 	@ZAPTELVERSION="${ZAPTELVERSION}" build_tools/make_version_h > $@.tmp
@@ -327,26 +292,17 @@
 tonezone.lo: tonezone.c
 	$(CC) -c $(CFLAGS) -o $@ $^
 
-tor2fw.h: tormenta2.rbt makefw 
-	./makefw $< tor2fw > $@
-
-radfw.h: pciradio.rbt makefw
-	./makefw $< radfw > $@
-
-makefw: makefw.c
-	$(HOSTCC) -o $@ $^
-
-prereq: config.status tor2fw.h radfw.h version.h
-
-zttool.o: zaptel.h
+prereq: config.status version.h
+
+zttool.o: kernel/zaptel.h
 zttool.o: CFLAGS+=$(NEWT_INCLUDE)
 zttool: LDLIBS+=$(NEWT_LIB)
 
-ztscan.o: zaptel.h
-
-ztprovision.o: zaptel.h
-
-ztmonitor.o: zaptel.h
+ztscan.o: kernel/zaptel.h
+
+ztprovision.o: kernel/zaptel.h
+
+ztmonitor.o: kernel/zaptel.h
 
 ztspeed: CFLAGS=
 
@@ -359,7 +315,7 @@
 $(LTZ_SO): $(LTZ_SO_OBJS)
 	$(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lm
 
-ztcfg.o: ztcfg.h zaptel.h
+ztcfg.o: ztcfg.h kernel/zaptel.h
 ztcfg: ztcfg.o $(LTZ_A)
 ztcfg: LDLIBS+=-lm
 
@@ -382,42 +338,13 @@
 fxotune: LDLIBS+=-lm
 fxsdump: LDLIBS+=-lm
 
-ifeq ($(BUILDVER),linux24)
-wct4xxp/wct4xxp.o:
-	$(MAKE) -C wct4xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
-
-tor2.o: tor2-hw.h tor2fw.h
-
-zaptel-base.o: digits.h arith.h sec.h sec-2.h kb1ec.h mg2ec.h zconfig.h
-
-wcusb.o: wcusb.h
-
-wctdm.o: wctdm.h
-
-wctdm24xxp/wctdm24xxp.o:
-	$(MAKE) -C wctdm24xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
-
-wcte12xp/wcte12xp.o:
-	$(MAKE) -C wcte12xp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
-
-pciradio.o: radfw.h
-
-ztdummy.o: ztdummy.h
-
-zaptel.o: zaptel-base.o $(ZAPTEL_HPEC)
-	$(LD) -r -o $@ $< $(ZAPTEL_HPEC)
-
-$(filter-out zaptel.o,$(BUILD_TOPDIR_MODULES:%=%.o)) zaptel-base.o: %.o: %.c zaptel.h
-	$(CC) $(KFLAGS) -o $@ -c $<
-endif
-
 stackcheck: checkstack modules
-	./checkstack *.ko */*.ko
+	./checkstack kernel/*.ko kernel/*/*.ko
 
 README.html: README
 	$(ASCIIDOC) -n -a toc -a toclevels=3 $<
 
-xpp/README.Astribank.html: xpp/README.Astribank
+kernel/xpp/README.Astribank.html: kernel/xpp/README.Astribank
 	cd $(@D); $(ASCIIDOC) -o $(@F) -n -a toc -a toclevels=4 $(<F)
 
 # on Debian: this requires the full groof, not just groff-base.
@@ -487,7 +414,7 @@
 
 install-firmware:
 ifeq ($(HOTPLUG_FIRMWARE),yes)
-	$(MAKE) -C firmware hotplug-install DESTDIR=$(DESTDIR)
+	$(MAKE) -C firmware hotplug-install DESTDIR=$(DESTDIR) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
 endif
 
 install-libs: libs
@@ -516,7 +443,7 @@
 	done
 
 install-include:
-	$(INSTALL) -D -m 644 zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
+	$(INSTALL) -D -m 644 kernel/zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
 
 devices:
 ifndef DYNFS
@@ -557,8 +484,7 @@
 
 BASENAMES=$(sort $(shell for x in $(ALL_MODULES); do basename $x; done))
 uninstall-modules:
-ifeq ($(BUILDVER),linux24)
-else
+ifneq ($(BUILDVER),linux24)
 	@./build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) $(BASENAMES)
 	@for x in $(ALL_MODULES); do \
 		rm -f $(DESTDIR)/lib/modules/$(KVERS)/extra/$$x ; \
@@ -567,17 +493,13 @@
 	done;
 endif
 
-BASENAMES=$(sort $(shell for mod in $(ALL_MODULES); do basename $$mod; done))
-
+ifeq ($(BUILDVER),linux24)
 install-modules: $(INSTALL_MODULES) uninstall-modules
-ifeq ($(BUILDVER),linux24)
 	$(INSTALL) -d $(DESTDIR)$(MOD_DIR)
 	$(INSTALL) -m 644 $(INSTALL_MODULES) $(DESTDIR)$(MOD_DIR)
 else
+install-modules: 
 	$(KMAKE_INST)
-  ifneq (,$(wildcard datamods/syncppp.ko))
-	$(MAKE) -C datamods install
-  endif
 endif
 	[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
 
@@ -603,7 +525,7 @@
 	@echo "optimal value for the variable MODULES ."
 	@echo ""
 	@echo "I think that the zaptel hardware you have on your system is:"
-	@xpp/utils/zaptel_hardware || true
+	@kernel/xpp/utils/zaptel_hardware || true
 
 
 update:
@@ -622,17 +544,11 @@
 
 clean:
 	-@$(MAKE) -C menuselect clean
-	rm -f torisatool makefw tor2fw.h radfw.h
+	rm -f torisatool
 	rm -f $(BINS)
 	rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
 	rm -f $(LTZ_SO) $(LTZ_A) *.lo
-ifeq ($(BUILDVER),linux26)
-  ifneq (,$(KSRC))
 	$(KMAKE) clean
-  endif
-else
-	$(MAKE) -C wct4xxp clean
-endif
 	@for dir in $(SUBDIRS_UTILS_ALL); do \
 		$(MAKE) -C $$dir clean; \
 	done
@@ -678,8 +594,6 @@
 	@echo "Generating input for menuselect ..."
 	@build_tools/make_tree > $@
 
-.EXPORT_ALL_VARIABLES:
-
 .PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs install-utils-subdirs utils-subdirs uninstall-modules
 
 endif

Modified: team/sruffell/voicebus/README
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/README?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/README (original)
+++ team/sruffell/voicebus/README Wed Feb 27 15:27:46 2008
@@ -9,14 +9,20 @@
 ------------------
 Digital Cards
 ~~~~~~~~~~~~~
-- wct4xxp: 
-  * Digium newer quad-span T1/E1/J1 cards: Wildcard TE420P/TE410P/TE405P 
-  * Digium newer dual-span T1/E1/J1 cards: Wildcard TE220P/TE210P/TE205P 
-- wcte12xp: Digium Wildcard TE120P and the TE122P single-span T1/E1/J1 card
-- wcte11xp: Digium Wildcard TE110P T1/E1/J1
+- wct4xxp:
+  * Digium TE205P/TE207P/TE210P/TE212P: PCI dual-port T1/E1/J1
+  * Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1
+  * Digium TE220: PCI-Express dual-port T1/E1/J1
+  * Digium TE420: PCI-Express quad-port T1/E1/J1
+- wcte12xp:
+  * Digium TE120P: PCI single-port T1/E1/J1
+  * Digium TE121: PCI-Express single-port T1/E1/J1
+  * Digium TE122: PCI single-port T1/E1/J1
+- wcte11xp:
+  * Digium TE110P: PCI single-port T1/E1/J1
 - wct1xxp: 
-  * Wildcard T100P (old single-span T1)
-  * Wildcard E100P (old single-span E1)
+  * Digium T100P: PCI single-port T1
+  * Digium E100P: PCI single-port E1
 - tor2: Tormenta quad-span T1/E1 card from the Zapata Telephony project
 - torisa: The old dual-span ISA T1 card from Zapata Telephony
 
@@ -24,11 +30,13 @@
 Analog Cards
 ~~~~~~~~~~~~
 - wctdm24xxp: 
-  * Digium TDM2400P card: up to 24 analog ports
-  * Digium TDM800P card: up to 8 analog ports
-- wctdm: Digium TDM400P card: up to 4 analog ports
+  * Digium TDM2400P/AEX2400: up to 24 analog ports
+  * Digium TDM800P/AEX800: up to 8 analog ports
+  * Digium TDM410: up to 4 analog ports
+- wctdm:
+  * Digium TDM400P: up to 4 analog ports
 - xpp: Xorcom Astribank: a USB connected unit of up to 32 ports
-  (also BRI)
+  (includeing the digital BRI and E1/T1 modules)
 - wcfxo: X100P, similar and clones. A simple single-port FXO card
 - wcusb: Digium S100U: A simple single-port USB FXS unit
 
@@ -326,6 +334,82 @@
 Currently that file must set "TELEPHONY=yes" for the zaptel init.d to
 work.
 
+Module Parameters
+~~~~~~~~~~~~~~~~~
+The kernel modules can be configured through module parameters. Module
+parameters can optionally be set at load time. They are normally set (if
+needed) by a line in a file under /etc/modprobe.d/ or in the file
+/etc/modprobe.conf (Or /etc/modules.conf in kernel 2.4).
+
+Example line:
+
+  options zaptel debug=1
+
+The module parameters can normally be modified at runtime through sysfs:
+
+  pungenday:~# cat /sys/module/zaptel/parameters/debug 
+  0
+  pungenday:~# echo 1 >/sys/module/zaptel/parameters/debug
+  pungenday:~# cat /sys/module/zaptel/parameters/debug 
+  1
+
+Viewing and setting parameters that way is possible as of kernel 2.6 .
+In kernels older than 2.6.10, the sysfs "files" for the parameters
+reside directly under /sys/module/'module_name' .
+
+Useful module parameters:
+
+debug (most modules)::
+  Sets debug mode / debug level. With most modules 'debug' can be either
+  disabled (0, the default value) or enabled (any other value). 
+  +
+  +
+  wctdm and wcte1xp print several extra debugging messages if the value
+  of debug is more than 1.
+  +
+  +
+  Some modules have "debugging flags" bits - the value of debug is a
+  bitmask and several messages are printed if some bits are set:
+  - ztdummy:
+    * 1: DEBUG_GENERAL - general error messages.
+    * 2: DEBUG_TICKS - Show that the module is alive :-)
+  - wctdm24xxp:
+    * 1: DEBUG_CARD
+    * 2: DEBUG_ECHOCAN
+  - wct4xxp:
+    * 1: DEBUG_MAIN
+    * 2: DEBUG_DTMF
+    * 4: DEBUG_REGS
+    * 8: DEBUG_TSI
+    * 16: DEBUG_ECHOCAN
+    * 32: DEBUG_RBS
+    * 64: DEBUG_FRAMER
+  +
+  +
+  The xpp modules use 'print_dbg' instead of 'debug' . Refer to
+  README.Astribank.
+
+deftaps (zaptel)::
+  The default size for the echo canceller. The number is in "taps", that
+  is "samples", 1/8 ms. The default is 64 - for a tail size of 8 ms.
+  +
+  +
+  Asterisk's chan_zap tends to pass its own value anyway, with a
+  different default size. So normally setting this doesn't change
+  anything.
+
+To get a list of parameters supported by a module, use 
+
+  modinfo module_name
+
+Or, for a module you have just built:
+
+  modinfo ./module_name.ko
+
+For the xpp modules this will also include the description and default
+value of the module. You can find a list of useful xpp module parameters
+in README.Astribank .
+
 
 Zaptel PERL modules
 -------------------

Modified: team/sruffell/voicebus/build_tools/test_kernel_git
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/build_tools/test_kernel_git?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/build_tools/test_kernel_git (original)
+++ team/sruffell/voicebus/build_tools/test_kernel_git Wed Feb 27 15:27:46 2008
@@ -6,12 +6,15 @@
 CONF_FILE=build_tools/git_test.conf
 
 usage() {
-	echo "$0: test building Zaptel vs. kernel from git"
+	me=`basename $0`
+	echo "$me: test building Zaptel vs. kernel from git"
 	echo "Usage:"
-	echo "  $0 checkout <kerneldir>  Pull a kernel version into <kerneldir>"
-	echo "  $0 update                Update (pull) the kernel tree."
-	echo "  $0 setver <kernel_ver>   Set the kernel version"
-	echo "  $0 test                  Test-build"
+	echo "  $me checkout <kerneldir>  Pull a kernel version into <kerneldir>"
+	echo "  $me update                Update (pull) the kernel tree."
+	echo "  $me setver <kernel_ver>   Set the kernel version"
+	echo "  $me test                  Test-build"
+	echo ""
+	echo "  $me versions [pattern]    List available versions."
 }
 
 # Set a variable in $CONF_FILE
@@ -43,11 +46,15 @@
 		kernel_dir="$2"
 		cd "$kernel_dir"
 		git clone $GIT_URL
-		set_ver kernel_dir "$kernel_dir/linux-2.6"
+		set_var kernel_dir "$kernel_dir/linux-2.6"
 		;;
 	update)
 		cd "$kernel_dir"
-		git-pull
+		git pull
+		;;
+	versions)
+		cd "$kernel_dir"
+		git tag -l $2 | cut -c2-
 		;;
 	setver)
 		kernel_ver="$2"

Modified: team/sruffell/voicebus/configure.ac
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/configure.ac?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/configure.ac (original)
+++ team/sruffell/voicebus/configure.ac Wed Feb 27 15:27:46 2008
@@ -9,7 +9,7 @@
 AC_INIT(zaptel, ZAP_VERSION, www.asterisk.org)
 
 # check existence of the package
-AC_CONFIG_SRCDIR([zaptel-base.c])
+AC_CONFIG_SRCDIR([kernel/zaptel-base.c])
 
 AC_COPYRIGHT("Zaptel")
 AC_REVISION($Revision$)

Modified: team/sruffell/voicebus/firmware/Makefile
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/firmware/Makefile?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/firmware/Makefile (original)
+++ team/sruffell/voicebus/firmware/Makefile Wed Feb 27 15:27:46 2008
@@ -13,7 +13,7 @@
 
 .PHONY: dist-clean all uninstall have_download install
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/makeopts
+-include ../menuselect.makeopts ../makeopts
 
 PWD:=$(shell pwd)
 

Modified: team/sruffell/voicebus/fxotune.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/fxotune.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/fxotune.c (original)
+++ team/sruffell/voicebus/fxotune.c Wed Feb 27 15:27:46 2008
@@ -24,11 +24,11 @@
 #include <sys/time.h>
 
 #ifdef STANDALONE_ZAPATA
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #else
 #include <zaptel/zaptel.h>
 #endif
-#include "wctdm.h"
+#include "kernel/wctdm.h"
 #include "fxotune.h"
 
 #define TEST_DURATION 2000
@@ -167,7 +167,8 @@
 	memset(&dop, 0, sizeof(dop));
 	dop.op = ZT_DIAL_OP_REPLACE;
 	dop.dialstr[0] = 'T';
-	strncpy(dop.dialstr + 1, info->dialstr, sizeof(dop.dialstr) - 1);
+	zap_copy_string(dop.dialstr + 1, info->dialstr, sizeof(dop.dialstr));
+
 
 	if (ioctl(info->device, ZT_DIAL, &dop)) {
 		fprintf(stderr, "Unable to dial!\n");

Modified: team/sruffell/voicebus/fxotune.h
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/fxotune.h?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/fxotune.h (original)
+++ team/sruffell/voicebus/fxotune.h Wed Feb 27 15:27:46 2008
@@ -12,8 +12,6 @@
  *
  * (C) 2005 Digium, Inc.
  */
-
-#include "wctdm.h"
 
 struct wctdm_echo_coefs echo_trys [] =
 {

Modified: team/sruffell/voicebus/fxstest.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/fxstest.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/fxstest.c (original)
+++ team/sruffell/voicebus/fxstest.c Wed Feb 27 15:27:46 2008
@@ -5,9 +5,9 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #include "tonezone.h"
-#include "wctdm.h"
+#include "kernel/wctdm.h"
 
 static int tones[] = {
 	ZT_TONE_DIALTONE,

Modified: team/sruffell/voicebus/hdlcgen.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/hdlcgen.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/hdlcgen.c (original)
+++ team/sruffell/voicebus/hdlcgen.c Wed Feb 27 15:27:46 2008
@@ -1,5 +1,5 @@
 #define FAST_HDLC_NEED_TABLES
-#include "fasthdlc.h"
+#include "kernel/fasthdlc.h"
 #include <stdio.h>
 #include <fcntl.h>
 #include <string.h>

Modified: team/sruffell/voicebus/hdlcstress.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/hdlcstress.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/hdlcstress.c (original)
+++ team/sruffell/voicebus/hdlcstress.c Wed Feb 27 15:27:46 2008
@@ -2,7 +2,7 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #include <stdio.h>
 #include <linux/types.h>
 #include <linux/ppp_defs.h> 
@@ -11,7 +11,7 @@
 #include <stdlib.h>
 #include "bittest.h"
 #define FAST_HDLC_NEED_TABLES
-#include "fasthdlc.h"
+#include "kernel/fasthdlc.h"
 
 /* #define BLOCK_SIZE 2048 */
 #define BLOCK_SIZE 2041

Modified: team/sruffell/voicebus/hdlctest.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/hdlctest.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/hdlctest.c (original)
+++ team/sruffell/voicebus/hdlctest.c Wed Feb 27 15:27:46 2008
@@ -2,7 +2,7 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #include <stdio.h>
 #include <linux/types.h>
 #include <linux/ppp_defs.h> 
@@ -11,7 +11,7 @@
 #include <stdlib.h>
 #include "bittest.h"
 #define FAST_HDLC_NEED_TABLES
-#include "fasthdlc.h"
+#include "kernel/fasthdlc.h"
 
 #define BLOCK_SIZE 2039
 

Modified: team/sruffell/voicebus/hdlcverify.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/hdlcverify.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/hdlcverify.c (original)
+++ team/sruffell/voicebus/hdlcverify.c Wed Feb 27 15:27:46 2008
@@ -1,5 +1,5 @@
 #define FAST_HDLC_NEED_TABLES
-#include "fasthdlc.h"
+#include "kernel/fasthdlc.h"
 #include <stdio.h>
 #include <fcntl.h>
 #include <string.h>

Modified: team/sruffell/voicebus/install_prereq
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/install_prereq?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/install_prereq (original)
+++ team/sruffell/voicebus/install_prereq Wed Feb 27 15:27:46 2008
@@ -14,17 +14,22 @@
   echo "Usage: $0 install  Really install."
 }
 
-PACKAGES_DEBIAN="build-essential libnewt-dev libusb-dev"
+PACKAGES_DEBIAN="build-essential libnewt-dev libusb-dev modemp3d"
 PACKAGES_RH="gcc newt-devel libusb-devel"
 KVERS=`uname -r`
 
 case "$1" in
-test)    testcmd=echo ;;
+test)    testcmd=test_cmd ;;
 install) testcmd='' ;;
 '') usage; exit 0 ;;
 *) usage; exit 1 ;;
 esac
 
+NOTHING_TO_INSTALL=true
+test_cmd() {
+	NOTHING_TO_INSTALL=false
+	echo "$@"
+}
 
 # Fixme: should be done by apt and not by dpkg?
 check_installed_debs() {
@@ -111,8 +116,14 @@
 fi
 
 echo "#############################################"
-echo "## $1 completed successfully"
 if in_test_mode; then
-	echo "## (in test mode)"
+  if $NOTHING_TO_INSTALL; then
+    echo "## $1 completed successfully ((In test mode) "
+  else
+    echo "## $1: some extra packages are needed to build zaptel"
+    exit 1
+  fi
+else
+  echo "## $1 completed successfully"
 fi
 echo "#############################################"

Propchange: team/sruffell/voicebus/kernel/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Wed Feb 27 15:27:46 2008
@@ -1,0 +1,1 @@
+oct612x http://svn.digium.com/svn/octasic_api/oct612x/tags/PR49-00/software

Propchange: team/sruffell/voicebus/kernel/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 27 15:27:46 2008
@@ -1,0 +1,9 @@
+*.cmd
+*.mod.c
+*.o
+*.ko
+.tmp_versions
+radfw.h
+tor2fw.h
+makefw
+Module.symvers

Propchange: team/sruffell/voicebus/kernel/hpec/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 27 15:27:46 2008
@@ -1,0 +1,2 @@
+*.o_shipped
+LICENSE

Propchange: team/sruffell/voicebus/kernel/wct4xxp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 27 15:27:46 2008
@@ -1,0 +1,3 @@
+*.mod.c
+*.cmd
+*.ko

Propchange: team/sruffell/voicebus/kernel/wctc4xxp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 27 15:27:46 2008
@@ -1,0 +1,4 @@
+*.cmd
+*.mod.c
+*.ko
+codec_test

Propchange: team/sruffell/voicebus/kernel/wctdm24xxp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 27 15:27:46 2008
@@ -1,0 +1,4 @@
+*.cmd
+*.o
+*.ko
+*.mod.c

Propchange: team/sruffell/voicebus/kernel/wcte12xp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 27 15:27:46 2008
@@ -1,0 +1,3 @@
+*.mod.c
+*.cmd
+*.ko

Propchange: team/sruffell/voicebus/kernel/xpp/
------------------------------------------------------------------------------
    svn:executable = utils/zaptel-helper

Propchange: team/sruffell/voicebus/kernel/xpp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 27 15:27:46 2008
@@ -1,0 +1,9 @@
+*.o
+*.ko
+*.o.cmd
+*.ko.cmd
+*.mod.c
+.tmp_versions
+.*.swp
+xpp_version.h
+README.Astribank.html

Propchange: team/sruffell/voicebus/kernel/xpp/utils/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 27 15:27:46 2008
@@ -1,0 +1,15 @@
+fpga_load
+test_parse
+libhexfile.*
+.*.swp
+print_modes
+init_fxo_modes
+wctdm_fxomodes.h
+lszaptel.8
+xpp_blink.8
+xpp_sync.8
+zt_registration.8
+zaptel_hardware.8
+zapconf.8
+perlcheck
+adj_clock

Modified: team/sruffell/voicebus/live_zap
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/live_zap?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/live_zap (original)
+++ team/sruffell/voicebus/live_zap Wed Feb 27 15:27:46 2008
@@ -155,7 +155,7 @@
 	ZAPTEL_FILE=$DESTDIR/etc/zaptel.conf \
 	ZAPATA_FILE=$DESTDIR/etc/asterisk/zapata-channels.conf \
 		zapconf
-	ztcfg
+	ztcfg -c $DESTDIR/etc/zaptel.conf
 	# TODO: fxotune, hpec
 	# or find a way to reuse init.d start sequence.
 

Modified: team/sruffell/voicebus/patgen.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/patgen.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/patgen.c (original)
+++ team/sruffell/voicebus/patgen.c Wed Feb 27 15:27:46 2008
@@ -11,7 +11,7 @@
 #include "bittest.h"
 
 #ifdef STANDALONE_ZAPATA
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #else
 #include <zaptel/zaptel.h>
 #endif

Modified: team/sruffell/voicebus/patlooptest.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/patlooptest.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/patlooptest.c (original)
+++ team/sruffell/voicebus/patlooptest.c Wed Feb 27 15:27:46 2008
@@ -9,7 +9,7 @@
 #include <time.h>
 
 #ifdef STANDALONE_ZAPATA
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #else
 #include <zaptel/zaptel.h>
 #endif

Modified: team/sruffell/voicebus/pattest.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/pattest.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/pattest.c (original)
+++ team/sruffell/voicebus/pattest.c Wed Feb 27 15:27:46 2008
@@ -11,7 +11,7 @@
 #include "bittest.h"
 
 #ifdef STANDALONE_ZAPATA
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #else
 #include <zaptel/zaptel.h>
 #endif

Modified: team/sruffell/voicebus/ppp/zaptel.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/ppp/zaptel.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/ppp/zaptel.c (original)
+++ team/sruffell/voicebus/ppp/zaptel.c Wed Feb 27 15:27:46 2008
@@ -223,7 +223,7 @@
 	}
     }
 
-    strncpy(devnam, cp, sizeof(devnam) - 1);
+    zap_copy_string(devnam, cp, sizeof(devnam));
 
     info("Using zaptel device '%s'\n", devnam);
 

Modified: team/sruffell/voicebus/sethdlc-new.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/sethdlc-new.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/sethdlc-new.c (original)
+++ team/sruffell/voicebus/sethdlc-new.c Wed Feb 27 15:27:46 2008
@@ -22,6 +22,7 @@
 #include <sys/socket.h>
 #include <linux/if.h>
 #include <linux/sockios.h>
+#include "kernel/zaptel.h"
 
 #if GENERIC_HDLC_VERSION != 4
 #error Generic HDLC layer version mismatch, please get correct sethdlc.c
@@ -673,7 +674,7 @@
 	if (sock < 0)
 		error("Unable to create socket: %s\n", strerror(errno));
   
-	strncpy(req.ifr_name, argv[1], sizeof(req.ifr_name) - 1); /* Device name */
+	zap_copy_string(req.ifr_name, argv[1], sizeof(req.ifr_name)); /* Device name */
 
 	if (argc == 2)
 		show_port();

Modified: team/sruffell/voicebus/sethdlc.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/sethdlc.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/sethdlc.c (original)
+++ team/sruffell/voicebus/sethdlc.c Wed Feb 27 15:27:46 2008
@@ -10,6 +10,7 @@
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <linux/if.h>
+#include "kernel/zaptel.h"
 
 
 struct ifreq req;		/* for ioctl */
@@ -293,7 +294,7 @@
 	if (sock<0)
 		error("Unable to create socket: %s\n", strerror(errno));
   
-	strncpy(req.ifr_name, argv[1], sizeof(req.ifr_name) - 1); /* Device name */
+	zap_copy_string(req.ifr_name, argv[1], sizeof(req.ifr_name)); /* Device name */
 
 	if (argc == 2) {
 		show_port(sock);

Modified: team/sruffell/voicebus/timertest.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/timertest.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/timertest.c (original)
+++ team/sruffell/voicebus/timertest.c Wed Feb 27 15:27:46 2008
@@ -9,7 +9,7 @@
 #include <errno.h>
 
 #ifdef STANDALONE_ZAPATA
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #else
 #include <zaptel/zaptel.h>
 #endif

Modified: team/sruffell/voicebus/tonezone.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/tonezone.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/tonezone.c (original)
+++ team/sruffell/voicebus/tonezone.c Wed Feb 27 15:27:46 2008
@@ -30,6 +30,7 @@
 #include <unistd.h>
 #include <errno.h>
 
+#include "kernel/zaptel.h"
 #include "tonezone.h"
 
 #define DEFAULT_ZT_DEV "/dev/zap/ctl"
@@ -318,12 +319,14 @@
 	int iopenedit = 1;
 	struct zt_tone_def_header *h;
 
+	memset(buf, 0, sizeof(buf));
+
 	h = ptr;
 	ptr += sizeof(*h);
 	space -= sizeof(*h);
 	h->zone = z->zone;
 
-	strncpy(h->name, z->description, sizeof(h->name) - 1);
+	zap_copy_string(h->name, z->description, sizeof(h->name));
 
 	for (x = 0; x < ZT_MAX_CADENCE; x++) 
 		h->ringcadence[x] = z->ringcadence[x];

Modified: team/sruffell/voicebus/tonezone.h
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/tonezone.h?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/tonezone.h (original)
+++ team/sruffell/voicebus/tonezone.h Wed Feb 27 15:27:46 2008
@@ -25,7 +25,7 @@
 #define _TONEZONE_H
 
 #ifdef STANDALONE_ZAPATA
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #else
 #include <zaptel/zaptel.h>
 #endif

Modified: team/sruffell/voicebus/torisatool.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/torisatool.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/torisatool.c (original)
+++ team/sruffell/voicebus/torisatool.c Wed Feb 27 15:27:46 2008
@@ -28,7 +28,7 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <errno.h>
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 
 static void usage(void)
 {

Modified: team/sruffell/voicebus/ztcfg-dude.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/ztcfg-dude.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/ztcfg-dude.c (original)
+++ team/sruffell/voicebus/ztcfg-dude.c Wed Feb 27 15:27:46 2008
@@ -39,7 +39,7 @@
 #include <errno.h>
 #include <math.h>
 #ifdef STANDALONE_ZAPATA
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #include "tonezone.h"
 #else
 #include <zaptel/zaptel.h>
@@ -187,8 +187,8 @@
 	}
 
 
-	strncpy(zds[numdynamic].driver, realargs[0], sizeof(zds[numdynamic].driver));
-	strncpy(zds[numdynamic].addr, realargs[1], sizeof(zds[numdynamic].addr));
+	zap_copy_string(zds[numdynamic].driver, realargs[0], sizeof(zds[numdynamic].driver));
+	zap_copy_string(zds[numdynamic].addr, realargs[1], sizeof(zds[numdynamic].addr));
 	zds[numdynamic].numchans = chans;
 	zds[numdynamic].timing = timing;
 	
@@ -296,7 +296,7 @@
 	for (x=0;x<res;x++) {
 		if (strchr(args[x], '-')) {
 			/* It's a range */
-			strncpy(argcopy, args[x], sizeof(argcopy));
+			zap_copy_string(argcopy, args[x], sizeof(argcopy));
 			res2 = parseargs(argcopy, range, 2, '-');
 			if (res2 != 2) {
 				error("Syntax error in range '%s'.  Should be <val1>-<val2>.\n", args[x]);
@@ -571,7 +571,7 @@
 		error("Too many tone zones specified\n");
 		return 0;
 	}
-	strncpy(zonestoload[numzones++], args, sizeof(zonestoload[0]));
+	zap_copy_string(zonestoload[numzones++], args, sizeof(zonestoload[0]));
 	return 0;
 }
 

Modified: team/sruffell/voicebus/ztcfg.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/ztcfg.c?view=diff&rev=3887&r1=3886&r2=3887
==============================================================================
--- team/sruffell/voicebus/ztcfg.c (original)
+++ team/sruffell/voicebus/ztcfg.c Wed Feb 27 15:27:46 2008
@@ -38,7 +38,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #ifdef STANDALONE_ZAPATA
-#include "zaptel.h"
+#include "kernel/zaptel.h"
 #include "tonezone.h"
 #else
 #include <zaptel/zaptel.h>
@@ -268,8 +268,8 @@
 	}
 
 
-	strncpy(zds[numdynamic].driver, realargs[0], sizeof(zds[numdynamic].driver));
-	strncpy(zds[numdynamic].addr, realargs[1], sizeof(zds[numdynamic].addr));
+	zap_copy_string(zds[numdynamic].driver, realargs[0], sizeof(zds[numdynamic].driver));
+	zap_copy_string(zds[numdynamic].addr, realargs[1], sizeof(zds[numdynamic].addr));
 	zds[numdynamic].numchans = chans;
 	zds[numdynamic].timing = timing;
 	
@@ -377,7 +377,7 @@
 	for (x=0;x<res;x++) {
 		if (strchr(args[x], '-')) {
 			/* It's a range */
-			strncpy(argcopy, args[x], sizeof(argcopy));
+			zap_copy_string(argcopy, args[x], sizeof(argcopy));
 			res2 = parseargs(argcopy, range, 2, '-');
 			if (res2 != 2) {
 				error("Syntax error in range '%s'.  Should be <val1>-<val2>.\n", args[x]);
@@ -571,7 +571,7 @@
 				} else {
 					cc[x].sigtype = ZT_SIG_HDLCNET;
 					if (idle) {

[... 97 lines stripped ...]



More information about the zaptel-commits mailing list