Changeset 158:92ddca5e455c in finroc_plugins_tcp


Ignore:
Timestamp:
02.06.2017 23:28:29 (2 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Fixes issue related to initialization of shared published register info between primary and express connections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • internal/tConnection.cpp

    r157 r158  
    246246          serialization_info.SetRegisterEntryEncoding(static_cast<uint>(network_transport::runtime_info::tRegisterUIDs::SCHEME_HANDLER), rrlib::serialization::tRegisterEntryEncoding::PUBLISH_REGISTER_ON_CHANGE); 
    247247        } 
    248         connection->SharedConnectionInfo().input_stream_prototype.Reset(unused_initialization_buffer, deserialization_info); 
    249         connection->SharedConnectionInfo().output_stream_prototype.Reset(unused_initialization_buffer, serialization_info); 
    250  
    251         connection->InitFrontBuffer(); 
    252248 
    253249        if (primary_connection && connection->SharedConnectionInfo().remote_runtime->GetPrimaryConnection() != connection) 
     
    257253          return; 
    258254        } 
     255        else if (primary_connection) 
     256        { 
     257          connection->SharedConnectionInfo().input_stream_prototype.Reset(unused_initialization_buffer, deserialization_info); 
     258          connection->SharedConnectionInfo().output_stream_prototype.Reset(unused_initialization_buffer, serialization_info); 
     259        } 
    259260        else if (express_only_connection) 
    260261        { 
    261           if (!connection->SharedConnectionInfo().remote_runtime->AddConnection(connection, true)) 
     262          if (!connection->SharedConnectionInfo().remote_runtime->AddConnection(connection, false)) 
    262263          { 
    263264            connection->SharedConnectionInfo().remote_runtime = nullptr; 
     
    266267          } 
    267268        } 
     269 
     270        connection->InitFrontBuffer(); 
    268271        connection->peer.RunEventLoop(); 
    269272 
Note: See TracChangeset for help on using the changeset viewer.