NSIS-ka
A free C++ implementation of NSIS protocols

Changeset 4493


Ignore:
Timestamp:
Sep 28, 2009, 12:08:40 PM (8 years ago)
Author:
stud-lenk
Message:

Fix issues with timer module

Location:
ntlp/branches/20090723-multicast/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ntlp/branches/20090723-multicast/src/ntlp_statemodule_querier.cpp

    r4492 r4493  
    429429      } else {
    430430        // purge list of unresponsive peers later
    431         starttimer(r_key, r_entry, mcast_collect, 0, remaining_responses_time);
     431        starttimer(r_key, r_entry, mcast_collect, 0, remaining_responses_time, false);
    432432      }
    433433    }
     
    575575    } else {
    576576      // purge list of unresponsive peers later
    577       starttimer(r_key, r_entry, mcast_collect, 0, remaining_responses_time);
     577      starttimer(r_key, r_entry, mcast_collect, 0, remaining_responses_time, false);
    578578    }
    579579
     
    11781178        if (r_entry->get_timer_type_multicast() == mcast_collect) {
    11791179          ERRCLog(param.name, "List of multicast peers hasn't been purged (mcast_collect timer should have fired before but didn't). Skipping purge for this time");
    1180           // Ensure later timer events on mcast_collect get ignored
    1181           //
    11821180          // We do not need to stoptimer() because timer handling checks for
    1183           // the correct value in routingentry::timer_type_multicast and
    1184           // routingentry::timer_id_multicast. If a new timer gets started
    1185           // the latter will get assigned a new value and thus will entirely
    1186           // invalidate the old timer event
    1187           r_entry->set_timer_type_multicast(none);
     1181          // the correct routing state. If the node isn't in ESTABLISHED
     1182          // to_mcast_collect will not expire multicast peers.
    11881183        }
    11891184        r_entry->expire_multicast_peers();
     
    12411236      return;
    12421237    }
     1238    r_entry->set_timer_type_multicast(none);
    12431239
    12441240    if (r_entry->get_state() != qn_established) {
     
    12541250      DLog(param.name, "Timer slot multicast, timer is valid, id: " << timermsg->get_id());
    12551251
    1256 
    12571252      EVLog(param.name, color[magenta] << "MCastCollect Timer went off" << color[off]);
    12581253      r_entry->purge_multicast_peers();
    12591254           
     1255      r_entry->set_timer_id_multicast(0);
    12601256      param.rt.unlock(r_key);
    12611257    } // end if timer valid
  • ntlp/branches/20090723-multicast/src/routingentry.cpp

    r4486 r4493  
    197197  if (purged_peer_count > 0)
    198198    DLog("MulticastQN", "purge_multicast_peers(): " << purged_peer_count << " peers removed from list of multicast peers");
    199 
    200   // ensure later timer events on mcast_collect get ignored:
    201   set_timer_type_multicast(none);
    202199}
    203200
Note: See TracChangeset for help on using the changeset viewer.