Esempio n. 1
0
void DCPS_IR_Domain::remove_dead_participants()
{
  if (0 < deadParticipants_.size()) {
    DCPS_IR_Participant* dead = 0;
    DCPS_IR_Participant_Set::ITERATOR iter = deadParticipants_.begin();

    // repeat end() due to the value possibly changing from additional dead
    // participants during notifications
    while (iter != deadParticipants_.end()) {
      dead = *iter;
      ++iter;

      OpenDDS::DCPS::RepoIdConverter converter(dead->get_id());
      ACE_ERROR((LM_ERROR,
                 ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Domain::remove_dead_participants () ")
                 ACE_TEXT("Removing dead participant 0x%x id %C\n"),
                 dead,
                 std::string(converter).c_str()));
      deadParticipants_.remove(dead);

      dead->set_alive(0);

      CORBA::Boolean notify_lost = 1;
      remove_participant(dead->get_id(), notify_lost);
    }
  }
}
void BasicRTSPOnlySubsession::deleteStream(unsigned clientSessionId, void*& streamToken){
    Destinations* dst = 
        (Destinations*)(fDestinationsHashTable->Lookup((char const*)clientSessionId));
    if (dst == NULL){
        return;
    } else {
        remove_participant(fStream->plist, clientSessionId);
    }
}
Esempio n. 3
0
void destroy_participant_list(participant_list_t *list){
    participant_data_t *participant;

    participant = list->first;

    while(participant != NULL){
        //pthread_rwlock_wrlock(&list->lock);
        remove_participant(list, participant->id);
        //pthread_rwlock_unlock(&list->lock);
        participant = participant->next;
    }

    assert(list->count == 0);

    pthread_rwlock_destroy(&list->lock);

    free(list);
}