Changeset 3041 for source/ariba/utility/system
- Timestamp:
- Apr 23, 2009, 9:18:12 AM (16 years ago)
- Location:
- source/ariba/utility/system
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/system/StartupWrapper.cpp
r2801 r3041 124 124 void StartupWrapper::startup(StartupInterface* service, bool block){ 125 125 126 StartupWrapper* s povnet= new StartupWrapper(service, block);126 StartupWrapper* startup = new StartupWrapper(service, block); 127 127 128 128 #ifdef UNDERLAY_OMNET 129 129 SystemQueue::instance().scheduleEvent( 130 SystemEvent( s povnet, StartupWrapperEventType, NULL), 0 );130 SystemEvent( startup, StartupWrapperEventType, NULL), 0 ); 131 131 #else 132 spovnet->handleSystemEvent( 133 SystemEvent( spovnet, StartupWrapperEventType, NULL)); 132 SystemQueue::instance().scheduleEvent( 133 SystemEvent( startup, StartupWrapperEventType, NULL), 0 ); 134 135 if( block ) getchar(); 134 136 #endif 135 137 } … … 149 151 150 152 service->startup(); 151 waitForExit();152 153 #ifndef UNDERLAY_OMNET154 service->shutdown();155 delete event.getListener();156 #endif157 153 } 158 154 159 void StartupWrapper::waitForExit(){ 160 #ifndef UNDERLAY_OMNET 161 if( blocking ) getchar(); 162 #endif 163 } 164 165 void StartupWrapper::shutdown(){ 155 void StartupWrapper::shutdown(StartupInterface* service){ 166 156 #ifdef UNDERLAY_OMNET 167 157 //TODO: service->shutdown(); 168 158 #endif 169 159 160 service->shutdown(); 170 161 SystemQueue::instance().cancel(); 171 162 } -
source/ariba/utility/system/StartupWrapper.h
r3040 r3041 72 72 static void initConfig(string filename); 73 73 static void startup(StartupInterface* service, bool block = true); 74 static void shutdown( );74 static void shutdown(StartupInterface* service); 75 75 76 76 #ifdef UNDERLAY_OMNET
Note:
See TracChangeset
for help on using the changeset viewer.