Ignore:
Timestamp:
Apr 23, 2009, 9:18:12 AM (16 years ago)
Author:
Christoph Mayer
Message:

-mehrere Fixes, Tickets #25 (bind listeners earlier), #21 (better pingpong), #40 (systemqueue misbehavior)

Location:
source/ariba/utility/system
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/system/StartupWrapper.cpp

    r2801 r3041  
    124124void StartupWrapper::startup(StartupInterface* service, bool block){
    125125
    126         StartupWrapper* spovnet = new StartupWrapper(service, block);
     126        StartupWrapper* startup = new StartupWrapper(service, block);
    127127
    128128#ifdef UNDERLAY_OMNET
    129129        SystemQueue::instance().scheduleEvent(
    130                 SystemEvent( spovnet, StartupWrapperEventType, NULL), 0 );
     130                SystemEvent( startup, StartupWrapperEventType, NULL), 0 );
    131131#else
    132         spovnet->handleSystemEvent(
    133                 SystemEvent( spovnet, StartupWrapperEventType, NULL));
     132        SystemQueue::instance().scheduleEvent(
     133                SystemEvent( startup, StartupWrapperEventType, NULL), 0 );
     134
     135        if( block ) getchar();
    134136#endif
    135137}
     
    149151
    150152        service->startup();
    151         waitForExit();
    152 
    153 #ifndef UNDERLAY_OMNET
    154         service->shutdown();
    155         delete event.getListener();
    156 #endif
    157153}
    158154
    159 void StartupWrapper::waitForExit(){
    160 #ifndef UNDERLAY_OMNET
    161         if( blocking ) getchar();
    162 #endif
    163 }
    164 
    165 void StartupWrapper::shutdown(){
     155void StartupWrapper::shutdown(StartupInterface* service){
    166156#ifdef UNDERLAY_OMNET
    167157        //TODO: service->shutdown();
    168158#endif
    169159
     160        service->shutdown();
    170161        SystemQueue::instance().cancel();
    171162}
  • source/ariba/utility/system/StartupWrapper.h

    r3040 r3041  
    7272        static void initConfig(string filename);
    7373        static void startup(StartupInterface* service, bool block = true);
    74         static void shutdown();
     74        static void shutdown(StartupInterface* service);
    7575
    7676#ifdef UNDERLAY_OMNET
Note: See TracChangeset for help on using the changeset viewer.