if(action->optional) { continue; }  if(task == stop_rsc) { if(state == rsc_starting) { state = rsc_restart; break; } else { state = rsc_stopping; } } else if(task == start_rsc) { if(state == rsc_stopping) { state = rsc_restart; break; } else { state = rsc_starting; } } );  if(native_data->running_on != NULL) { node_t *chosen = NULL; node_t *node = native_data->running_on->data;  if(rsc->color != NULL) { chosen = rsc->color->details->chosen_node; } if(state == rsc_unknown) { state = rsc_active;  } else if(state == rsc_restart) { CRM_DEV_ASSERT(chosen != NULL && node != NULL); if(crm_assert_failed) { crm_err("State for %s is unreliable", rsc->id);  } else if(safe_str_neq(node->details->id, chosen->details->id)) { state = rsc_move; } }  } else if(state == rsc_unknown) { state = rsc_stopped; }  return state; 
return RSC_ROLE_STOPPED; 
native_resource_state(resource_t *rsc){	enum action_tasks task = no_action;	rsc_state_t state = rsc_unknown;	native_variant_data_t *native_data = NULL;	get_native_variant_data(native_data, rsc);		slist_iter(		action, action_t, rsc->actions, lpc,		crm_debug_4("processing action %d for rsc=%s",			  action->id, rsc->id);		task = text2task(action->task);		if(action->optional) {			continue;		}		if(task == stop_rsc) {			if(state == rsc_starting) {				state = rsc_restart;				break;			} else {				state = rsc_stopping;			}		} else if(task == start_rsc) {			if(state == rsc_stopping) {				state = rsc_restart;				break;			} else {				state = rsc_starting;			}		}		);	if(native_data->running_on != NULL) {		node_t *chosen = NULL;		node_t *node = native_data->running_on->data;		if(rsc->color != NULL) {			chosen = rsc->color->details->chosen_node;		}		if(state == rsc_unknown) {			state = rsc_active;		} else if(state == rsc_restart) {			CRM_DEV_ASSERT(chosen != NULL && node != NULL);			if(crm_assert_failed) {				crm_err("State for %s is unreliable", rsc->id);							} else if(safe_str_neq(node->details->id,					chosen->details->id)) {				state = rsc_move;			}		}			} else if(state == rsc_unknown) {		state = rsc_stopped;	}		return state;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/2065bca105e40a57c710c374a7c857a783430218/native.c/clean/crm/pengine/native.c