Changeset 1021 for XIOS/dev/dev_olga/src/group_template_impl.hpp
- Timestamp:
- 01/10/17 14:36:29 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/group_template_impl.hpp
r1009 r1021 8 8 #include "context.hpp" 9 9 #include "event_client.hpp" 10 #include "context_client.hpp"11 10 #include "message.hpp" 12 11 #include "type.hpp" … … 419 418 420 419 } 421 422 template <class U, class V, class W> 423 void CGroupTemplate<U, V, W>::sendCreateChild(const string& id, const int srvPool) 424 { 425 CContext* context=CContext::getCurrent() ; 426 CContextClient* contextClientTmp = context->clientPrimServer[srvPool]; 420 421 template <class U, class V, class W> 422 void CGroupTemplate<U, V, W>::sendCreateChild(const string& id, CContextClient* client) 423 { 427 424 428 425 CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD) ; 429 if (c ontextClientTmp->isServerLeader())426 if (client->isServerLeader()) 430 427 { 431 428 CMessage msg ; 432 429 msg<<this->getId() ; 433 430 msg<<id ; 434 const std::list<int>& ranks = c ontextClientTmp->getRanksServerLeader();431 const std::list<int>& ranks = client->getRanksServerLeader(); 435 432 for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 436 433 event.push(*itRank,1,msg) ; 437 c ontextClientTmp->sendEvent(event) ;434 client->sendEvent(event) ; 438 435 } 439 else contextClientTmp->sendEvent(event) ; 440 } 436 else client->sendEvent(event) ; 437 } 438 441 439 442 440 template <class U, class V, class W> … … 444 442 { 445 443 CContext* context=CContext::getCurrent() ; 446 447 // if (! context->hasServer )448 444 if (context->hasClient) 449 445 { 450 // Use correct context client to send message 451 // CContextClient* contextClientTmp = (0 != context->clientPrimServer) ? context->clientPrimServer : context->client; 446 // Use correct context client to send message 452 447 int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1; 453 448 for (int i = 0; i < nbSrvPools; ++i)
Note: See TracChangeset
for help on using the changeset viewer.