if(on_node == NULL || on_node->details->online == FALSE) {
if(on_node == NULL) { action->runnable = FALSE;  } else if(on_node->details->online == FALSE) {
action_new(resource_t *rsc, enum action_tasks task,	   const char *timeout, node_t *on_node){	action_t *action = NULL;	GListPtr possible_matches = NULL;	if(rsc != NULL && task != monitor_rsc) {		possible_matches =			find_actions(rsc->actions, task, on_node);	}	if(possible_matches != NULL) {		if(g_list_length(possible_matches) > 1) {			crm_warn("Action %s for %s on %s exists %d times",				task2text(task), rsc?rsc->id:"<NULL>",				on_node?on_node->details->id:"<NULL>",				g_list_length(possible_matches));		}				action = g_list_nth_data(possible_matches, 0);		crm_devel("Found existing action (%d) %s for %s on %s",			  action->id,			  task2text(task), rsc?rsc->id:"<NULL>",			  on_node?on_node->details->id:"<NULL>");		/* todo: free possible_matches */		return action;	}	if(timeout == NULL && rsc != NULL) {		timeout = find_action_timeout(rsc, task);	}	if(action == NULL) {		crm_devel("Creating action %s for %s on %s",			  task2text(task), rsc?rsc->id:"<NULL>",			  on_node?on_node->details->id:"<NULL>");		crm_malloc(action, sizeof(action_t));		if(action != NULL) {			action->id   = 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   = FALSE;			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);			global_action_list = g_list_append(				global_action_list, action);			if(rsc != NULL) {				rsc->actions = g_list_append(					 rsc->actions, action);			}			crm_devel("Action %d created", action->id);		}	}		if(timeout != NULL) {		add_hash_param(action->extra, "timeout", timeout);	}			if(rsc != NULL) {		if(on_node == NULL || on_node->details->online == FALSE) {			crm_warn("Action %d %s for %s on %s is unrunnable",				 action->id,				 task2text(task), rsc?rsc->id:"<NULL>",				 on_node?on_node->details->id:"<none>");			action->runnable = FALSE;		}				if(task == stop_rsc) {			rsc->stopping = TRUE;		} else if(task == start_rsc && action->runnable) {			rsc->starting = TRUE;		} else if(task == start_rsc) {			rsc->starting = FALSE;		} 	}	return action;}