diff --git a/MAC/APL/APLCommon/test/ControllerProtMenu.cc b/MAC/APL/APLCommon/test/ControllerProtMenu.cc index b4e496b03517f6baabb8f710dab7f7e03e22dde3..fae78b349c1f85580ef973733f5ad6a5bd14c389 100644 --- a/MAC/APL/APLCommon/test/ControllerProtMenu.cc +++ b/MAC/APL/APLCommon/test/ControllerProtMenu.cc @@ -97,25 +97,18 @@ GCFEvent::TResult ControllerProtMenu::initial_state(GCFEvent& event, GCFPortInte } break; - case CONTROL_CONNECTED: { - CONTROLConnectedEvent msg(event); - cout << endl << "Connection result = " << msg.result << endl; - if (msg.result != CT_RESULT_NO_ERROR) { - cout << "Bailing out because of the errors." << endl; - GCFScheduler::instance()->stop (); - } - else { + case CONTROL_CONNECT: { + CONTROLConnectEvent msg(event); itsControllerName = msg.cntlrName; cout << endl << "Name of the controller is " << itsControllerName << endl; _doActionMenu(); // does a TRAN - } } break; case CONTROL_QUITED: { CONTROLQuitedEvent msg(event); cout << endl << "Connection failed with result = " << msg.result << endl; - if (msg.result != CT_RESULT_NO_ERROR) { + if (msg.result != CONTROL_OK_ERR) { cout << "Bailing out because of the errors." << endl; GCFScheduler::instance()->stop (); } @@ -157,7 +150,7 @@ GCFEvent::TResult ControllerProtMenu::claim_state(GCFEvent& event, GCFPortInterf case CONTROL_CLAIMED: { CONTROLClaimedEvent msg(event); cout << endl << "Claim result = " << msg.result << endl; - if (msg.result != CT_RESULT_NO_ERROR) { + if (msg.result != CONTROL_OK_ERR) { cout << "Bailing out because of the errors." << endl; GCFScheduler::instance()->stop (); } @@ -203,7 +196,7 @@ GCFEvent::TResult ControllerProtMenu::prepare_state(GCFEvent& event, GCFPortInte case CONTROL_PREPARED: { CONTROLPreparedEvent msg(event); cout << endl << "Prepare result = " << msg.result << endl; - if (msg.result != CT_RESULT_NO_ERROR) { + if (msg.result != CONTROL_OK_ERR) { cout << "Bailing out because of the errors." << endl; GCFScheduler::instance()->stop (); } @@ -248,7 +241,7 @@ GCFEvent::TResult ControllerProtMenu::run_state(GCFEvent& event, GCFPortInterfac case CONTROL_RESUMED: { CONTROLResumedEvent msg(event); cout << endl << "Resume result = " << msg.result << endl; - if (msg.result != CT_RESULT_NO_ERROR) { + if (msg.result != CONTROL_OK_ERR) { cout << "Bailing out because of the errors." << endl; GCFScheduler::instance()->stop (); } @@ -293,7 +286,7 @@ GCFEvent::TResult ControllerProtMenu::suspend_state(GCFEvent& event, GCFPortInte case CONTROL_SUSPENDED: { CONTROLSuspendedEvent msg(event); cout << endl << "Suspend result = " << msg.result << endl; - if (msg.result != CT_RESULT_NO_ERROR) { + if (msg.result != CONTROL_OK_ERR) { cout << "Bailing out because of the errors." << endl; GCFScheduler::instance()->stop (); } @@ -338,7 +331,7 @@ GCFEvent::TResult ControllerProtMenu::release_state(GCFEvent& event, GCFPortInte case CONTROL_RELEASED: { CONTROLReleasedEvent msg(event); cout << endl << "Release result = " << msg.result << endl; - if (msg.result != CT_RESULT_NO_ERROR) { + if (msg.result != CONTROL_OK_ERR) { cout << "Bailing out because of the errors." << endl; GCFScheduler::instance()->stop (); } @@ -382,7 +375,7 @@ GCFEvent::TResult ControllerProtMenu::finish_state(GCFEvent& event, GCFPortInter case CONTROL_QUITED: { CONTROLQuitedEvent msg(event); - if (msg.result != CT_RESULT_NO_ERROR) { + if (msg.result != CONTROL_OK_ERR) { cout << endl << "WARNING: Finish result = " << msg.result << endl; } else {