Changeset 24:cddabeebd261 in finroc_plugins_network_transport


Ignore:
Timestamp:
31.05.2017 23:42:14 (22 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Fixes robustness issue (potential crash) with closed connections and improves inline documentation

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • generic_protocol/tConnection.cpp

    r19 r24  
    221221    non_acknowledged_bulk_packets += 0x8000; 
    222222  } 
     223  assert(GetRemoteRuntime()); 
    223224  bool more_bulk_packets_allowed = non_acknowledged_bulk_packets < static_cast<int>(GetRemoteRuntime()->NetworkTransport().par_max_not_acknowledged_packets_bulk.Get()); 
    224225 
  • generic_protocol/tRemoteRuntime.cpp

    r23 r24  
    943943void tRemoteRuntime::SendPendingMessages(const rrlib::time::tTimestamp& time_now) 
    944944{ 
     945  if ((!GetPrimaryConnection()) || GetPrimaryConnection()->IsClosed()) 
     946  { 
     947    return; 
     948  } 
     949 
    945950  for (auto it = not_ready_calls.begin(); it < not_ready_calls.end();) 
    946951  { 
     
    981986  for (auto & connection : connections) 
    982987  { 
    983     if (connection) 
     988    if (connection && (!connection->IsClosed())) 
    984989    { 
    985990      connection->SendPendingMessages(time_now); 
  • runtime_info/tFrameworkElementInfo.h

    r21 r24  
    229229 
    230230  /*! 
    231    * Serializes info on single framework element to stream so that it can later 
     231   * Serializes info one single framework element to stream so that it can later 
    232232   * be deserialized in typically another runtime environment. 
     233   * Note that its handle is also serialized. 
    233234   * 
    234235   * \param stream Binary stream to serialize to 
     
    239240   */ 
    240241  template < bool ENABLE = !Tremote > 
    241   static void Serialize(typename std::enable_if<ENABLE, rrlib::serialization::tOutputStream>::type& stream, const core::tFrameworkElement& framework_element, bool serialize_owned_connectors = false) 
     242  static void Serialize(typename std::enable_if<ENABLE, rrlib::serialization::tOutputStream>::type& stream, const core::tFrameworkElement& framework_element, bool serialize_owned_connectors) 
    242243  { 
    243244    rrlib::uri::tURI uri; 
Note: See TracChangeset for help on using the changeset viewer.