event==OC_EV_MS_NEW_MEMBERSHIP?"NEW MEMBERSHIP": event==OC_EV_MS_NOT_PRIMARY?"NOT PRIMARY": event==OC_EV_MS_PRIMARY_RESTORED?"PRIMARY RESTORED": event==OC_EV_MS_EVICTED?"EVICTED": 
*event==OC_EV_MS_NEW_MEMBERSHIP?"NEW MEMBERSHIP": *event==OC_EV_MS_NOT_PRIMARY?"NOT PRIMARY": *event==OC_EV_MS_PRIMARY_RESTORED?"PRIMARY RESTORED": *event==OC_EV_MS_EVICTED?"EVICTED": 
do_ccm_update_cache(long long action,		    enum crmd_fsa_cause cause,		    enum crmd_fsa_state cur_state,		    enum crmd_fsa_input current_input,		    void *data){	enum crmd_fsa_input next_input = I_NULL;	int lpc, offset;	GHashTable *members = NULL;	oc_ed_t event = *((struct ccm_data *)data)->event;	const oc_ev_membership_t *oc = ((struct ccm_data *)data)->oc;	oc_node_list_t *tmp = NULL, *membership_copy = NULL;	crm_malloc(membership_copy, sizeof(oc_node_list_t));	crm_info("Updating CCM cache after a \"%s\" event.", 	       event==OC_EV_MS_NEW_MEMBERSHIP?"NEW MEMBERSHIP":	       event==OC_EV_MS_NOT_PRIMARY?"NOT PRIMARY":	       event==OC_EV_MS_PRIMARY_RESTORED?"PRIMARY RESTORED":	       event==OC_EV_MS_EVICTED?"EVICTED":	       "NO QUORUM MEMBERSHIP");	if(membership_copy == NULL) {		crm_crit("Couldnt create membership copy - out of memory");		return I_ERROR;	}		/*--*-- All Member Nodes --*--*/	offset = oc->m_memb_idx;	membership_copy->members_size = oc->m_n_member;	if(membership_copy->members_size > 0) {		membership_copy->members =			g_hash_table_new(g_str_hash, g_str_equal);		members = membership_copy->members;				for(lpc=0; lpc < membership_copy->members_size; lpc++) {			oc_node_t *member = NULL;			crm_malloc(member, sizeof(oc_node_t));						if(member == NULL) {				continue;			}			member->node_id =				oc->m_array[offset+lpc].node_id;						member->node_born_on =				oc->m_array[offset+lpc].node_born_on;						member->node_uname =				crm_strdup(oc->m_array[offset+lpc].node_uname);			g_hash_table_insert(members, member->node_uname, member);			}			} else {		membership_copy->members = NULL;	}		/*--*-- New Member Nodes --*--*/	offset = oc->m_in_idx;	membership_copy->new_members_size = oc->m_n_in;	if(membership_copy->new_members_size > 0) {		membership_copy->new_members =			g_hash_table_new(g_str_hash, g_str_equal);		members = membership_copy->new_members;				for(lpc=0; lpc < membership_copy->new_members_size; lpc++) {			oc_node_t *member = NULL;			crm_malloc(member, sizeof(oc_node_t));			if(member == NULL) {				continue;			}						member->node_id =				oc->m_array[offset+lpc].node_id;						member->node_born_on =				oc->m_array[offset+lpc].node_born_on;			member->node_uname =				crm_strdup(oc->m_array[offset+lpc].node_uname);			g_hash_table_insert(members, member->node_uname, member);		}	} else {		membership_copy->new_members = NULL;	}		/*--*-- Recently Dead Member Nodes --*--*/	offset = oc->m_out_idx;	membership_copy->dead_members_size = oc->m_n_out;	if(membership_copy->dead_members_size > 0) {		membership_copy->dead_members =			g_hash_table_new(g_str_hash, g_str_equal);		members = membership_copy->dead_members;		for(lpc=0; lpc < membership_copy->dead_members_size; lpc++) {			oc_node_t *member = NULL;			crm_malloc(member, sizeof(oc_node_t));			if(member == NULL) {				continue;			}						member->node_id =				oc->m_array[offset+lpc].node_id;						member->node_born_on =				oc->m_array[offset+lpc].node_born_on;						member->node_uname =				crm_strdup(oc->m_array[offset+lpc].node_uname);			g_hash_table_insert(members, member->node_uname, member);		}	} else {		membership_copy->dead_members = NULL;	}	tmp = fsa_membership_copy;	fsa_membership_copy = membership_copy;	if(AM_I_DC) {		/* should be sufficient for only the DC to do this */		free_xml(do_update_cib_nodes(NULL, FALSE));	}		/* Free the old copy */	if(tmp != NULL) {		if(tmp->members != NULL)			g_hash_table_foreach_remove(				tmp->members, ghash_node_clfree, NULL);		if(tmp->new_members != NULL)			g_hash_table_foreach_remove(				tmp->new_members, ghash_node_clfree, NULL);		if(tmp->dead_members != NULL)			g_hash_table_foreach_remove(				tmp->dead_members, ghash_node_clfree, NULL);		crm_free(tmp);	}		return next_input;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/d2700cbafa254ba2444f96704134980df41a0032/ccm.c/buggy/crm/crmd/ccm.c