Commit 9c25030e authored by Matteo Quintiliani's avatar Matteo Quintiliani

Added ew message when terminating on request


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@641 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent d7317c34
......@@ -66,9 +66,12 @@ restartMe
# Each module may also issue a text string for an error.
#
err: 0 nerr: 1 tsec: 0 page: 0 mail: 99
text: "Missed message"
text: "Missed message (in desc)"
#
err: 1 nerr: 1 tsec: 0 page: 0 mail: 99
text: "Error receiving data (in desc)"
#
err: 2 nerr: 1 tsec: 0 page: 0 mail: 99
text: "Terminating on request (in desc)"
#
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxptool.c,v 1.105 2008-01-11 14:31:50 mtheo Exp $
* $Id: nmxptool.c,v 1.106 2008-01-14 09:16:22 mtheo Exp $
*
*/
......@@ -760,6 +760,7 @@ int main (int argc, char **argv) {
/* Check if we are being asked to terminate */
if( nmxptool_ew_check_flag_terminate() ) {
logit ("t", "nmxptool terminating on request\n");
nmxptool_ew_send_error(NMXPTOOL_EW_ERR_TERMREQ);
exitpdscondition = 0;
}
......
......@@ -30,7 +30,8 @@
NMXPTOOL_EW_ERR_MSG nmxptool_ew_err_msg[NMXPTOOL_EW_ERR_MAXVALUE] = {
{ NMXPTOOL_EW_ERR_NULL, ""} ,
{ NMXPTOOL_EW_ERR_RECVDATA, "Error receiving data." }
{ NMXPTOOL_EW_ERR_RECVDATA, "Error receiving data." },
{ NMXPTOOL_EW_ERR_TERMREQ, "Terminating on request." }
};
......
......@@ -23,10 +23,11 @@
#include <trace_buf.h>
/* TODO is number of different kinds of error */
#define NMXPTOOL_EW_ERR_MAXVALUE 2
#define NMXPTOOL_EW_ERR_MAXVALUE 3
#define NMXPTOOL_EW_ERR_NULL 0
#define NMXPTOOL_EW_ERR_RECVDATA 1
#define NMXPTOOL_EW_ERR_NULL 0
#define NMXPTOOL_EW_ERR_RECVDATA 1
#define NMXPTOOL_EW_ERR_TERMREQ 2
typedef struct {
unsigned int error;
......
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