Commit f200054c authored by Matteo Quintiliani's avatar Matteo Quintiliani

Fixed bug: exit if channelList is NULL


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@880 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 6aed3b52
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy * Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it * quintiliani@ingv.it
* *
* $Id: nmxptool.c,v 1.147 2008-03-04 22:41:15 mtheo Exp $ * $Id: nmxptool.c,v 1.148 2008-03-05 11:02:18 mtheo Exp $
* *
*/ */
...@@ -237,6 +237,11 @@ int main (int argc, char **argv) { ...@@ -237,6 +237,11 @@ int main (int argc, char **argv) {
channelList = nmxp_getAvailableChannelList(params.hostname, params.portnumberpds, NMXP_DATA_TIMESERIES); channelList = nmxp_getAvailableChannelList(params.hostname, params.portnumberpds, NMXP_DATA_TIMESERIES);
} }
if(!channelList) {
nmxp_log(NMXP_LOG_ERR, NMXP_LOG_D_CHANNEL, "Channel list has not been received!\n");
return 1;
}
channelList_subset = nmxp_chan_subset(channelList, NMXP_DATA_TIMESERIES, params.channels, CURRENT_NETWORK); channelList_subset = nmxp_chan_subset(channelList, NMXP_DATA_TIMESERIES, params.channels, CURRENT_NETWORK);
/* Free the complete channel list */ /* Free the complete channel list */
......
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