Exemple #1
0
static int mod_init(void)
{
	matrix_db_vars();

	if (init_shmlock() != 0) return -1;
	if (matrix_db_init() != 0) return -1;
	if (matrix_db_open() != 0) return -1;
	if (init_matrix() != 0) return -1;
	matrix_db_close();
	return 0;
}
Exemple #2
0
static int mod_init(void)
{
	if(matrix_rpc_init()<0) {
		LM_ERR("failed to init RPC commands");
		return -1;
	}

	if (init_shmlock() != 0) return -1;
	if (matrix_db_init() != 0) return -1;
	if (matrix_db_open() != 0) return -1;
	if (init_matrix() != 0) return -1;
	matrix_db_close();
	return 0;
}
Exemple #3
0
static int mod_init(void)
{
	if(register_mi_mod(exports.name, mi_cmds)!=0) {
		LM_ERR("failed to register MI commands\n");
		return -1;
	}
	if(matrix_rpc_init()<0) {
		LM_ERR("failed to init RPC commands");
		return -1;
	}

	if (init_shmlock() != 0) return -1;
	if (matrix_db_init() != 0) return -1;
	if (matrix_db_open() != 0) return -1;
	if (init_matrix() != 0) return -1;
	matrix_db_close();
	return 0;
}