CRM_DEV_ASSERT(decode_transition_key(a_key, &uuid, &a_id)); crm_free(uuid); CRM_DEV_ASSERT(decode_transition_key(b_key, &uuid, &b_id)); crm_free(uuid);
CRM_DEV_ASSERT(decode_transition_magic(a_key,&a_uuid,&a_id,&a_status)); CRM_DEV_ASSERT(decode_transition_magic(b_key,&b_uuid,&b_id,&b_status));
sort_op_by_callid(gconstpointer a, gconstpointer b){	char *uuid = NULL; 	const char *a_task_id = cl_get_string(a, XML_LRM_ATTR_CALLID); 	const char *b_task_id = cl_get_string(b, XML_LRM_ATTR_CALLID);	const char *a_key = cl_get_string(a, XML_ATTR_TRANSITION_KEY); 	const char *b_key = cl_get_string(b, XML_ATTR_TRANSITION_KEY);	int a_id = -1;	int b_id = -1;	CRM_DEV_ASSERT(a_task_id != NULL && b_task_id != NULL);		a_id = atoi(a_task_id);	b_id = atoi(b_task_id);	if(a_id == -1 && b_id == -1) {		/* do nothing */	} else if(a_id >= 0 && a_id < b_id) {		crm_debug_2("%s (%d) < %s (%d)", ID(a), a_id, ID(b), b_id);		return -1;	} else if(b_id >= 0 && a_id > b_id) {		crm_debug_2("%s (%d) > %s (%d)", ID(a), a_id, ID(b), b_id);		return 1;	}	/* now process pending ops */		CRM_DEV_ASSERT(a_key != NULL && b_key != NULL);	CRM_DEV_ASSERT(decode_transition_key(a_key, &uuid, &a_id)); crm_free(uuid);	CRM_DEV_ASSERT(decode_transition_key(b_key, &uuid, &b_id)); crm_free(uuid);		/* test for -1 so that shutdown ops appear last	 * by definition nothing else should get run on that node	 */	if(a_id == b_id) {	} else if(a_id < b_id || b_id == -1) {		crm_debug_2("%s (%d) < %s (%d)", ID(a), a_id, ID(b), b_id);		return -1;	} else if(a_id > b_id || a_id == -1) {		crm_debug_2("%s (%d) > %s (%d)", ID(a), a_id, ID(b), b_id);		return 1;	}	crm_debug_2("%s == %s", ID(a), ID(b));	return 0;}