[Home]

Summary:ASTERISK-03237: [patch] Debug mode in ztcfg no longer requires re-compile to activate, command line option added (twisted)
Reporter:samudrahaque (samudrahaque)Labels:
Date Opened:2005-01-09 13:10:29.000-0600Date Closed:2008-06-07 10:47:10
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ztcfg-debug.diff.txt
Description:Hello in ztcfg.c, which is part of the zaptel package with the Makefile information # $Id: Makefile,v 1.52.2.5 2004/12/26 23:59:53 russell Exp $

at line ASTERISK-54, the value of "debug" is set to 0. There is actually no command line option to enable this debug flag in the program, (and I suspect many other similiar programs also share the same feature-less debug), and in order to see the debug program output (see additional information below), you need to manually recompile the program and then running the program with "ztcfg -vv". I propose that a new flag 'd' be added to enable on-demand debugging in this program, for those developers who need to work with the FXO/FXS zonedata configuration and would like to know what the low level ztcfg is doing with their statements rather than having to 'dmesg' or tail /var/log/messages all the time.

****** ADDITIONAL INFORMATION ******

[root@ax1 zaptel]# ./ztcfg -vv
Line 131: loadzone = us
Line 143: defaultzone=us
Line 204: fxols=1
Line 205: fxsls=3
Line 206: fxsls=4
<End of File>

Zaptel Configuration
======================


Channel map:

Channel 01: FXO Loopstart (Default) (Slaves: 01)
Channel 03: FXS Loopstart (Default) (Slaves: 03)
Channel 04: FXS Loopstart (Default) (Slaves: 04)

3 channels configured.
Comments:By: twisted (twisted) 2005-01-09 18:43:33.000-0600

So am I correct in assuming that the only output you're concerned with is the same  information that is contained in the /etc/zaptel.conf file?

By: twisted (twisted) 2005-01-09 21:57:17.000-0600

Patch uploaded -- sytax as follows:

ztcfg -d [level]  

can be used with other flags as well, and if a level is not specified, will use debug level 1.  (valid ranges are 1-7)

Disclaimer on file :)

By: Mark Spencer (markster) 2005-01-09 22:02:39.000-0600

Fixed in CVS, thanks twisted

By: Digium Subversion (svnbot) 2008-06-07 10:47:10

Repository: dahdi
Revision: 535

U   trunk/ztcfg.c

------------------------------------------------------------------------
r535 | markster | 2008-06-07 10:47:10 -0500 (Sat, 07 Jun 2008) | 2 lines

Make debug settable (thanks twisted, bug ASTERISK-3237)

------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=535