Beispiel #1
0
struct mi_root* mi_bin_status(struct mi_root* cmd_tree, void* param)
{
	struct mi_root *rpl_tree;
	struct mi_node *rpl=NULL;

	rpl_tree = init_mi_tree(200, MI_OK_S, MI_OK_LEN);
	if (rpl_tree==0)
		return 0;
	rpl = &rpl_tree->node;
	rpl->flags |= MI_IS_ARRAY;

	if (rl_repl_cluster &&
		rl_bin_status(&rpl_tree->node, rl_repl_cluster, "repl_pipes_dest", 15)<0) {
		LM_ERR("cannot print status\n");
		goto free;
	}

	if (rl_repl_cluster &&
		rl_bin_status(&rpl_tree->node, rl_repl_cluster, "repl_pipes_source", 17)<0) {
		LM_ERR("cannot print status\n");
		goto free;
	}

	return rpl_tree;
free:
	free_mi_tree(rpl_tree);
	return 0;
}
Beispiel #2
0
struct mi_root* mi_bin_status(struct mi_root* cmd_tree, void* param)
{
	struct mi_root *rpl_tree;
	struct mi_node *rpl=NULL;

	rpl_tree = init_mi_tree(200, MI_OK_S, MI_OK_LEN);
	if (rpl_tree==0)
		return 0;
	rpl = &rpl_tree->node;
	rpl->flags |= MI_IS_ARRAY;

	if (rl_bin_status(rpl_tree) < 0) {
		LM_ERR("cannot print status\n");
		goto free;
	}

	return rpl_tree;
free:
	free_mi_tree(rpl_tree);
	return 0;
}