action->timeout = crm_get_msec(value);
action->timeout = atoi(value);
unpack_action(crm_data_t *xml_action) {	const char *tmp        = crm_element_value(xml_action, XML_ATTR_ID);	action_t   *action     = NULL;	crm_data_t *action_copy = NULL;	crm_data_t *nvpair_list = NULL;	if(tmp == NULL) {		crm_err("Actions must have an id!");		crm_log_xml_debug_3(xml_action, "Action with missing id");		return NULL;	}		action_copy = copy_xml(xml_action);	crm_malloc0(action, sizeof(action_t));	if(action == NULL) {		return NULL;	}		action->id       = atoi(tmp);	action->timeout  = 0;	action->interval = 0;	action->timer    = NULL;	action->invoked  = FALSE;	action->sent_update = FALSE;	action->complete = FALSE;	action->can_fail = FALSE;	action->type     = action_type_rsc;	action->xml      = action_copy;		if(safe_str_eq(crm_element_name(action_copy), XML_GRAPH_TAG_RSC_OP)) {		action->type = action_type_rsc;	} else if(safe_str_eq(crm_element_name(action_copy),			      XML_GRAPH_TAG_PSEUDO_EVENT)) {		action->type = action_type_pseudo;	} else if(safe_str_eq(crm_element_name(action_copy),			      XML_GRAPH_TAG_CRM_EVENT)) {		action->type = action_type_crm;	}	nvpair_list = find_xml_node(action_copy, XML_TAG_ATTRS, FALSE);	if(nvpair_list == NULL) {		crm_debug_2("No attributes in %s",			    crm_element_name(action_copy));	}		xml_child_iter(		nvpair_list, node_iter, XML_CIB_TAG_NVPAIR,				const char *key   = crm_element_value(			node_iter, XML_NVPAIR_ATTR_NAME);		const char *value = crm_element_value(			node_iter, XML_NVPAIR_ATTR_VALUE);		if(safe_str_eq(key, "timeout")) {			action->timeout = crm_get_msec(value);		} else if(safe_str_eq(key, "interval")) {			action->interval = crm_get_msec(value);		}		);	crm_debug_3("Action %d has timer set to %dms",		  action->id, action->timeout);		crm_malloc0(action->timer, sizeof(te_timer_t));	action->timer->timeout   = 2 * action->timeout;	action->timer->source_id = -1;	action->timer->reason    = timeout_action;	action->timer->action    = action;	tmp = crm_element_value(action_copy, "can_fail");	cl_str_to_boolean(tmp, &(action->can_fail));	return action;}