Commit 42d7b031 authored by Matteo Quintiliani's avatar Matteo Quintiliani

Moved free(channelList)


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@866 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent ffa30fab
...@@ -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.146 2008-03-04 14:01:54 mtheo Exp $ * $Id: nmxptool.c,v 1.147 2008-03-04 22:41:15 mtheo Exp $
* *
*/ */
...@@ -238,6 +238,12 @@ int main (int argc, char **argv) { ...@@ -238,6 +238,12 @@ int main (int argc, char **argv) {
} }
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 */
if(channelList) {
free(channelList);
channelList = NULL;
}
/* Check if some channel already exists */ /* Check if some channel already exists */
if(channelList_subset->number <= 0) { if(channelList_subset->number <= 0) {
...@@ -296,12 +302,6 @@ int main (int argc, char **argv) { ...@@ -296,12 +302,6 @@ int main (int argc, char **argv) {
} }
/* Free the complete channel list */
if(channelList) {
free(channelList);
channelList = NULL;
}
#ifdef HAVE_EARTHWORMOBJS #ifdef HAVE_EARTHWORMOBJS
if(params.ew_configuration_file) { if(params.ew_configuration_file) {
nmxptool_ew_attach(); nmxptool_ew_attach();
...@@ -720,17 +720,20 @@ int main (int argc, char **argv) { ...@@ -720,17 +720,20 @@ int main (int argc, char **argv) {
/* Get a subset of channel from arguments, in respect to the step 3 of PDS */ /* Get a subset of channel from arguments, in respect to the step 3 of PDS */
channelList_subset_waste = nmxp_chan_subset(channelList, NMXP_DATA_TIMESERIES, params.channels, CURRENT_NETWORK); channelList_subset_waste = nmxp_chan_subset(channelList, NMXP_DATA_TIMESERIES, params.channels, CURRENT_NETWORK);
/* Free the complete channel list */
if(channelList) {
free(channelList);
channelList = NULL;
}
/* TODO check if channelList_subset_waste is equal to channelList_subset and free */ /* TODO check if channelList_subset_waste is equal to channelList_subset and free */
if(channelList_subset_waste) { if(channelList_subset_waste) {
free(channelList_subset_waste); free(channelList_subset_waste);
channelList_subset_waste = NULL; channelList_subset_waste = NULL;
} }
/* PDS Step 4: Send a Request Pending (optional) */ /* PDS Step 4: Send a Request Pending (optional) */
/* PDS Step 5: Send AddChannels */ /* PDS Step 5: Send AddChannels */
/* Request Data */ /* Request Data */
nmxp_sendAddTimeSeriesChannel(naqssock, channelList_subset, params.stc, params.rate, (params.flag_buffered)? NMXP_BUFFER_YES : NMXP_BUFFER_NO); nmxp_sendAddTimeSeriesChannel(naqssock, channelList_subset, params.stc, params.rate, (params.flag_buffered)? NMXP_BUFFER_YES : NMXP_BUFFER_NO);
...@@ -1243,13 +1246,6 @@ static void clientShutdown(int sig) { ...@@ -1243,13 +1246,6 @@ static void clientShutdown(int sig) {
/* PDS Step 8: Close the socket */ /* PDS Step 8: Close the socket */
nmxp_closeSocket(naqssock); nmxp_closeSocket(naqssock);
/* Free the complete channel list */
if(channelList) {
free(channelList);
channelList = NULL;
}
if(channelList_subset && channelList_Seq) { if(channelList_subset && channelList_Seq) {
#ifdef HAVE_LIBMSEED #ifdef HAVE_LIBMSEED
if(params.flag_writeseed) { if(params.flag_writeseed) {
......
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