Commit 4a938f0c authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

Fixed bug in nmxp_chan_print_channelList()


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@921 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 79806f0f
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxp_chan.c,v 1.37 2008-03-01 22:34:03 mtheo Exp $
* $Id: nmxp_chan.c,v 1.38 2008-03-12 08:30:40 mtheo Exp $
*
*/
......@@ -389,19 +389,24 @@ void nmxp_chan_sortByName(NMXP_CHAN_LIST *channelList) {
void nmxp_chan_print_channelList(NMXP_CHAN_LIST *channelList) {
int chan_number = channelList->number;
int chan_number = 0;
int i_chan = 0;
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_CHANNEL, "%04d channels:\n", chan_number);
for (i_chan = 0; i_chan < chan_number; i_chan++)
{
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_ANY, "%04d %12d %6s%c%-11s\n",
i_chan+1,
channelList->channel[i_chan].key,
" ",
' ',
NMXP_LOG_STR(channelList->channel[i_chan].name));
if(channelList) {
chan_number = channelList->number;
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_CHANNEL, "%04d channels:\n", chan_number);
for (i_chan = 0; i_chan < chan_number; i_chan++)
{
nmxp_log(NMXP_LOG_NORM_NO, NMXP_LOG_D_ANY, "%04d %12d %6s%c%-11s\n",
i_chan+1,
channelList->channel[i_chan].key,
" ",
' ',
NMXP_LOG_STR(channelList->channel[i_chan].name));
}
} else {
nmxp_log(NMXP_LOG_ERR, NMXP_LOG_D_CHANNEL, "Channel list is NULL.\n");
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment