Commit ed7ae30a authored by Matteo Quintiliani's avatar Matteo Quintiliani

Managed recv_errno value for exiting from main loop


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@451 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 45be7d4b
...@@ -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.84 2007-10-07 18:12:37 mtheo Exp $ * $Id: nmxptool.c,v 1.85 2007-10-24 10:05:02 mtheo Exp $
* *
*/ */
...@@ -586,6 +586,8 @@ int main (int argc, char **argv) { ...@@ -586,6 +586,8 @@ int main (int argc, char **argv) {
/* Process Compressed or Decompressed Data */ /* Process Compressed or Decompressed Data */
pd = nmxp_receiveData(naqssock, channelList_subset, NETCODE_OR_CURRENT_NETWORK, params.timeoutrecv, &recv_errno); pd = nmxp_receiveData(naqssock, channelList_subset, NETCODE_OR_CURRENT_NETWORK, params.timeoutrecv, &recv_errno);
if(recv_errno == 0) {
/* Log contents of last packet */ /* Log contents of last packet */
if(params.flag_logdata) { if(params.flag_logdata) {
nmxp_data_log(pd); nmxp_data_log(pd);
...@@ -671,6 +673,10 @@ int main (int argc, char **argv) { ...@@ -671,6 +673,10 @@ int main (int argc, char **argv) {
// TODO // TODO
exitpdscondition = 1; exitpdscondition = 1;
} else {
nmxp_log(1, 0, "Error receiving data.\n");
exitpdscondition = 0;
}
#ifdef HAVE_EARTHWORMOBJS #ifdef HAVE_EARTHWORMOBJS
if(params.ew_configuration_file) { if(params.ew_configuration_file) {
......
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