Commit cde4b997 authored by Matteo Quintiliani's avatar Matteo Quintiliani

Add some error and debug messages. Issue #37

parent a1800fdc
Pipeline #5460 failed with stages
in 1 minute and 48 seconds
......@@ -233,7 +233,10 @@ int main( int argc, char **argv ) {
p_data_handler_func_destroy = ew2openapi_handler_osc_destroy;
break;
default:
/* TODO ERROR */
/* ERROR */
ew2openapi_logit( "e", "%s(%s): error params.flag_handler value %d not valid; exiting!\n",
params.cmdname, params.MyModName, params.flag_handler);
exit( -1 );
break;
}
......@@ -335,6 +338,8 @@ int main( int argc, char **argv ) {
}
}
ew2openapi_logit( "et", "%s(%s): joined to thread main()!\n", params.cmdname, params.MyModName );
/* Start main ew2openapi service loop, which aimlessly beats its heart.
**********************************/
while( tport_getflag( &params.HeartBeatRegion ) != TERMINATE &&
......@@ -679,7 +684,10 @@ thr_ret MessageHandler( void *p )
p_data_handler_func_handle = ew2openapi_handler_osc_handle;
break;
default:
/* TODO ERROR */
/* ERROR */
ew2openapi_logit( "et", "%s(%s): error setting data handler function; exiting!\n",
params->cmdname, params->MyModName );
exit( -1 );
break;
}
......@@ -794,7 +802,10 @@ thr_ret MessageHandler( void *p )
break;
default:
/* TODO ERROR */
/* ERROR */
ew2openapi_logit( "et", "%s(%s): error handler_status_code value %d not valid; exiting!\n",
params->cmdname, params->MyModName, handler_status_code);
exit( -1 );
break;
}
......
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