summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhuangming <huangminghuang@users.noreply.github.com>2003-12-05 21:55:34 +0000
committerhuangming <huangminghuang@users.noreply.github.com>2003-12-05 21:55:34 +0000
commit1a87d808911a448a14615c7115777f277d0278aa (patch)
treef7e4a0c471bbb1e1c99e90bb7dd5d238ef5bec72
parent6b5d858240eb08025e2ce70f5d105bba1b26e305 (diff)
downloadATCD-1a87d808911a448a14615c7115777f277d0278aa.tar.gz
*** empty log message ***
-rw-r--r--TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp14
-rw-r--r--TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.h2
-rw-r--r--TAO/orbsvcs/FTRT_Event_Service/Event_Service/svc.conf2
3 files changed, 15 insertions, 3 deletions
diff --git a/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp b/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp
index 277c114122b..6d0d8cd7832 100644
--- a/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp
+++ b/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp
@@ -15,13 +15,13 @@
#include "orbsvcs/FtRtEvent/Utils/RT_Task.h"
#include "orbsvcs/Event/EC_Default_Factory.h"
#include "Crash_Injector.h"
+#include <fstream>
ACE_RCSID (Event_Service,
FT_EventService,
"$Id$")
-
int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
TAO_EC_Default_Factory::init_svcs ();
@@ -115,6 +115,13 @@ FT_EventService::run(int argc, ACE_TCHAR* argv[])
if (report_factory(orb_.in(), ec_ior.in() )==-1)
return -1;
+ if (ior_file_.length()) {
+ std::ofstream file(ior_file_.c_str());
+ CORBA::String_var my_ior_string = orb_->object_to_string(ec_ior.in()
+ ACE_ENV_ARG_PARAMETER);
+ file << my_ior_string.in();
+ }
+
Crash_Injector* injector = Crash_Injector::instance();
while (injector ==0 || !injector->work_done() ) {
@@ -156,7 +163,7 @@ FT_EventService::parse_args (int argc, ACE_TCHAR* argv [])
}
}
- ACE_Get_Opt get_opt (argc, argv, ACE_LIB_TEXT("d:jprs:"));
+ ACE_Get_Opt get_opt (argc, argv, ACE_LIB_TEXT("d:jo:prs:"));
int opt;
while ((opt = get_opt ()) != EOF)
@@ -197,6 +204,9 @@ FT_EventService::parse_args (int argc, ACE_TCHAR* argv [])
this->global_scheduler_ = 0;
}
break;
+ case 'o':
+ ior_file_ = get_opt.opt_arg ();
+ break;
case '?':
default:
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.h b/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.h
index e23d2b44dc6..300f2e4a04f 100644
--- a/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.h
+++ b/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.h
@@ -17,6 +17,7 @@
#include "orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.h"
#include "orbsvcs/FtRtEvent/EventChannel/FTEC_Become_Primary_Listener.h"
#include "orbsvcs/RtecSchedulerC.h"
+#include "ace/SString.h"
#include "TP_Task.h"
namespace POA_RtecScheduler
@@ -50,6 +51,7 @@ private:
TAO_FTEC_Event_Channel::MEMBERSHIP membership_;
CORBA::ORB_var orb_;
TP_Task task_;
+ ACE_CString ior_file_;
};
#endif
diff --git a/TAO/orbsvcs/FTRT_Event_Service/Event_Service/svc.conf b/TAO/orbsvcs/FTRT_Event_Service/Event_Service/svc.conf
index 3059293d8a0..b84db3e26e9 100644
--- a/TAO/orbsvcs/FTRT_Event_Service/Event_Service/svc.conf
+++ b/TAO/orbsvcs/FTRT_Event_Service/Event_Service/svc.conf
@@ -21,4 +21,4 @@ static FTRTEC_Replication "$FTEC_REPLICATION_STRATEGY -Threads $FTEC_NUM_THREADS
static FTRTEC_Identification "-Name $FTEC_EVENT_SERVICE_NAME -Object_ID $FTEC_OBJECT_ID"
-static Crash_Injector "-type=after_reply -operation=push -num_invocation=4"
+static Crash_Injector "-n=4 -o=push -t=immediate"