gboolean optional, pe_working_set_t *data_set) 
gboolean optional, gboolean foo, pe_working_set_t *data_set) 
custom_action(resource_t *rsc, char *key, const char *task, node_t *on_node,	      gboolean optional, pe_working_set_t *data_set){	action_t *action = NULL;	GListPtr possible_matches = NULL;	CRM_DEV_ASSERT(key != NULL);	if(crm_assert_failed) { return NULL; }		CRM_DEV_ASSERT(task != NULL);	if(crm_assert_failed) { return NULL; }	if(rsc != NULL) {		possible_matches = find_actions(rsc->actions, key, on_node);	}		if(possible_matches != NULL) {		crm_free(key);				if(g_list_length(possible_matches) > 1) {			pe_warn("Action %s for %s on %s exists %d times",				task, rsc?rsc->id:"<NULL>",				on_node?on_node->details->uname:"<NULL>",				g_list_length(possible_matches));		}				action = g_list_nth_data(possible_matches, 0);		crm_debug_4("Found existing action (%d) %s for %s on %s",			  action->id, task, rsc?rsc->id:"<NULL>",			  on_node?on_node->details->uname:"<NULL>");	}	if(action == NULL) {		crm_debug_2("Creating action %d: %s for %s on %s",			    data_set->action_id, task, rsc?rsc->id:"<NULL>",			    on_node?on_node->details->uname:"<NULL>");		crm_malloc0(action, sizeof(action_t));		if(action != NULL) {			action->id   = data_set->action_id++;			action->rsc  = rsc;			action->task = task;			action->node = on_node;						action->actions_before   = NULL;			action->actions_after    = NULL;			action->failure_is_fatal = TRUE;						action->pseudo     = FALSE;			action->dumped     = FALSE;			action->runnable   = TRUE;			action->processed  = FALSE;			action->optional   = TRUE;			action->seen_count = 0;						action->extra = g_hash_table_new_full(				g_str_hash, g_str_equal,				g_hash_destroy_str, g_hash_destroy_str);			data_set->actions = g_list_append(					data_set->actions, action);			action->uuid = key;			if(rsc != NULL) {				action->op_entry = find_rsc_op_entry(rsc, key);				unpack_operation(					action, action->op_entry, data_set);				rsc->actions = g_list_append(					rsc->actions, action);			}			crm_debug_4("Action %d created", action->id);		}	}	if(optional == FALSE) {		crm_debug_2("Action %d marked manditory", action->id);		action->optional = FALSE;	}		if(rsc != NULL) {		if(action->node != NULL) {			unpack_instance_attributes(				action->op_entry, XML_TAG_ATTR_SETS,				action->node, action->extra, NULL,0, data_set);		}		if(action->node == NULL) {			action->runnable = FALSE;		} else if(rsc->is_managed == FALSE) {			pe_warn("Action %d %s is for %s (unmanaged)",				 action->id, task, rsc->id);			action->optional = TRUE;/*   			action->runnable = FALSE; */		} else if(action->node->details->online == FALSE) {			pe_warn("Action %d %s for %s on %s is unrunnable",				 action->id, task, rsc->id,				 action->node?action->node->details->uname:"<none>");			action->runnable = FALSE;		} else if(action->needs == rsc_req_nothing) {			crm_debug_2("Action doesnt require anything");			action->runnable = TRUE;#if 0			/*			 * No point checking this			 * - if we dont have quorum we cant stonith anyway			 */		} else if(action->needs == rsc_req_stonith) {			crm_debug_2("Action requires only stonith");			action->runnable = TRUE;#endif		} else if(data_set->have_quorum == FALSE			&& data_set->no_quorum_policy == no_quorum_stop) {			action->runnable = FALSE;			crm_warn("%s resource %s\t(%s) (cancelled : quorum)",				 action->task, rsc->id, action->node->details->uname);				} else if(data_set->have_quorum == FALSE			&& data_set->no_quorum_policy == no_quorum_freeze) {			crm_debug_2("Check resource is already active");			if(rsc->fns->active(rsc, TRUE) == FALSE) {				action->runnable = FALSE;				crm_warn("%s resource %s\t(%s) (cancelled : quorum freeze)",					 action->task, rsc->id,					 action->node->details->uname);			}		} else {			crm_debug_2("Action is runnable");			action->runnable = TRUE;		}				switch(text2task(action->task)) {			case stop_rsc:				rsc->stopping = TRUE;				break;			case start_rsc:				rsc->starting = FALSE;				if(action->runnable) {					rsc->starting = TRUE;				}				break;			default:				break;		}	}	return action;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/28c9570566c4e9f0c1322672672fe87a389a31db/utils.c/buggy/crm/pengine/utils.c