Changeset 726


Ignore:
Timestamp:
10/09/15 11:14:56 (6 years ago)
Author:
rlacroix
Message:

Delay the buffer size notication to the first time an event is sent.

This fixes synchronization issues in attached mode.

Location:
XIOS/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/context_client.cpp

    r725 r726  
    114114 
    115115    /*! 
    116     Special function to setup size of buffer not only on client side but also on server side 
    117     corresponding to the connection 
    118     */ 
    119     void CContextClient::sendBufferSizeEvent() 
    120     { 
    121       std::map<int,CClientBuffer*>::iterator it, itE; 
    122       std::map<int,StdSize>::const_iterator itMap = mapBufferSize_.begin(), iteMap = mapBufferSize_.end(); 
    123  
    124       if (itMap == iteMap) 
    125          ERROR("void CContextClient::sendBufferSizeEvent()", 
    126               <<"No information about server buffer, that should not happen..."); 
    127  
    128       for (; itMap != iteMap; ++itMap) 
    129       { 
    130         if (buffers.end() == buffers.find(itMap->first)) 
    131           newBuffer(itMap->first); 
    132       } 
    133  
    134       if (isAttachedModeEnabled()) 
    135       { 
    136         while (checkBuffers()) 
    137         { 
    138           parentServer->server->listen(); 
    139         } 
    140         CContext::setCurrent(context->getId()); 
    141       } 
    142     } 
    143  
    144     /*! 
    145116    If client is also server (attached mode), after sending event, it should process right away 
    146117    the incoming event. 
     
    267238   { 
    268239     mapBufferSize_ = mapSize; 
    269      sendBufferSizeEvent(); 
    270240   } 
    271241 
  • XIOS/trunk/src/context_client.hpp

    r704 r726  
    5050 
    5151      void setBufferSize(const std::map<int,StdSize>& mapSize); 
    52       void sendBufferSizeEvent(); 
     52 
    5353    public: 
    5454      CContext* context; //!< Context for client 
Note: See TracChangeset for help on using the changeset viewer.