if(native_data->running_on != NULL) { current = native_data->running_on->data;
if(rsc->running_on != NULL) { current = rsc->running_on->data;
native_create_notify_element(resource_t *rsc, action_t *op,			     notify_data_t *n_data, pe_working_set_t *data_set){	node_t *next = NULL;	node_t *current = NULL;	enum action_tasks task;	native_variant_data_t *native_data = NULL;	get_native_variant_data(native_data, rsc);	if(rsc->color != NULL) {		next = rsc->color->details->chosen_node;	}	if(native_data->running_on != NULL) {		current = native_data->running_on->data;	}	if(op->pre_notify == NULL || op->post_notify == NULL) {		/* no notifications required */		crm_debug_4("No notificaitons required for %s", op->task);		return;	}	crm_debug_2("Notificaitons required for %s", op->task);		task = text2task(op->task);	if(task == stop_rsc	   && rsc->role == RSC_ROLE_STARTED	   && rsc->next_role == RSC_ROLE_STOPPED) {		register_activity(rsc, op, n_data);		pe_pre_notify(rsc, current, op,n_data,data_set);	} else if(task != stop_rsc		  && rsc->role == RSC_ROLE_STOPPED		  && rsc->next_role == RSC_ROLE_STARTED ){		register_activity(rsc, op, n_data);		pe_post_notify(rsc, next, op, n_data, data_set);	} else if(rsc->role == RSC_ROLE_STARTED		  && rsc->next_role == RSC_ROLE_STARTED) {		action_t *start = start_action(rsc, next, TRUE);		if(start->optional) {			/* nothing happening to this resource */			pe_pre_notify(rsc, current, op, n_data, data_set);			pe_post_notify(rsc, current, op, n_data, data_set);			register_state(rsc, op, n_data);			/* restarting or moving */		} else if(task == stop_rsc) {			pe_pre_notify(rsc, current, op,n_data,data_set);			register_activity(rsc, op, n_data);		} else {			pe_post_notify(rsc, next, op, n_data, data_set);			register_activity(rsc, op, n_data);		}	}}