public_variable_neighborhood/public_variable_neighborhood.h
/**
 * Frees all connection and memory of the pvn (except the memory of the PVN struct).
 */
Frees all connection and memory of the pvn (except the memory of the PVN struct).
Frees all connection and memory of the pvn ( except the memory of the PVN struct ) .
void pvn_destroy(struct PVN* pvn)
{
	pvn_set_offline(pvn);
	if(list_of_all_public_variable_neighborhoods == pvn) { 
		list_of_all_public_variable_neighborhoods = pvn->next; 
	} else {
		struct PVN* tmp = list_of_all_public_variable_neighborhoods;
		while(tmp->next != pvn) {
			tmp = tmp->next;
		} 
		tmp->next = pvn->next;
	}
	pvn->maximum_age_of_neighbor_information = 0;
	pvn_remove_old_neighbor_information(pvn);
}
void pvn_destroy ( struct PVN * pvn ) { pvn_set_offline ( pvn ) ; if ( list_of_all_public_variable_neighborhoods == pvn ) { list_of_all_public_variable_neighborhoods = pvn -> next ; } else { struct PVN * tmp = list_of_all_public_variable_neighborhoods ; while ( tmp -> next != pvn ) { tmp = tmp -> next ; } tmp -> next = pvn -> next ; } pvn -> maximum_age_of_neighbor_information = 0 ; pvn_remove_old_neighbor_information ( pvn ) ; }
Frees all connection and memory of the pvn (except the memory of the PVN struct).
Frees all connection and memory of the pvn ( except the memory of the PVN struct ) .
//close network //find entry in list and remove it //free all neighbor entries