当前位置: 首页>>代码示例>>C++>>正文


C++ db_func_t::close方法代码示例

本文整理汇总了C++中db_func_t::close方法的典型用法代码示例。如果您正苦于以下问题:C++ db_func_t::close方法的具体用法?C++ db_func_t::close怎么用?C++ db_func_t::close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在db_func_t的用法示例。


在下文中一共展示了db_func_t::close方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: mod_init


//.........这里部分代码省略.........
	LM_DBG("mt_char_list=%s \n", mt_char_list.s);
	mt_char_table_init();

	/* binding to mysql module */
	if(db_bind_mod(&db_url, &mt_dbf))
	{
		LM_ERR("database module not found\n");
		return -1;
	}

	if (!DB_CAPABILITY(mt_dbf, DB_CAP_ALL))
	{
		LM_ERR("database module does not "
				"implement all functions needed by the module\n");
		return -1;
	}

	/* open a connection with the database */
	db_con = mt_dbf.init(&db_url);
	if(db_con==NULL)
	{
		LM_ERR("failed to connect to the database\n");
		return -1;
	}

	LM_DBG("database connection opened successfully\n");

	if ( (mt_lock=lock_alloc())==0) {
		LM_CRIT("failed to alloc lock\n");
		goto error1;
	}
	if (lock_init(mt_lock)==0 ) {
		LM_CRIT("failed to init lock\n");
		goto error1;
	}

	if(mt_defined_trees())
	{
		LM_DBG("static trees defined\n");

		pt = mt_get_first_tree();

		while(pt!=NULL)
		{
			LM_DBG("loading from tree <%.*s>\n",
					pt->tname.len, pt->tname.s);

			/* loading all information from database */
			if(mt_load_db(pt)!=0)
			{
				LM_ERR("cannot load info from database\n");
				goto error1;
			}
			pt = pt->next;
		}
		/* reset db_table value */
		db_table.s = "";
		db_table.len = 0;
	} else {
		if(db_table.len<=0)
		{
			LM_ERR("no trees table defined\n");
			goto error1;
		}
		if(mt_init_list_head()<0)
		{
			LM_ERR("unable to init trees list head\n");
			goto error1;
		}
		/* loading all information from database */
		if(mt_load_db_trees()!=0)
		{
			LM_ERR("cannot load trees from database\n");
			goto error1;
		}
	}
	mt_dbf.close(db_con);
	db_con = 0;

#if 0
	mt_print_tree(mt_get_first_tree());
#endif

	/* success code */
	return 0;

error1:
	if (mt_lock)
	{
		lock_destroy( mt_lock );
		lock_dealloc( mt_lock );
		mt_lock = 0;
	}
	mt_destroy_trees();

	if(db_con!=NULL)
		mt_dbf.close(db_con);
	db_con = 0;
	return -1;
}
开发者ID:adubovikov,项目名称:kamailio,代码行数:101,代码来源:mtree_mod.c

示例2: mod_init


//.........这里部分代码省略.........

    if(min_expires< 0)
        min_expires= 0;

    if(default_expires< 600)
        default_expires= 3600;

    /* import the TM auto-loading function */
    if((load_tm=(load_tm_f)find_export("load_tm", 0, 0))==NULL)
    {
        LM_ERR("can't import load_tm\n");
        return -1;
    }
    /* let the auto-loading function load all TM stuff */

    if(load_tm(&tmb)==-1)
    {
        LM_ERR("can't load tm functions\n");
        return -1;
    }

    init_db_url( db_url , 0 /*cannot be null*/);
    db_table.len = strlen(db_table.s);

    /* binding to database module  */
    if (db_bind_mod(&db_url, &pua_dbf))
    {
        LM_ERR("Database module not found\n");
        return -1;
    }
    if (!DB_CAPABILITY(pua_dbf, DB_CAP_ALL)) {
        LM_ERR("Database module does not implement all functions needed"
               " by the module\n");
        return -1;
    }

    pua_db = pua_dbf.init(&db_url);
    if (!pua_db)
    {
        LM_ERR("while connecting database\n");
        return -1;
    }
    /* verify table version  */
    if(db_check_table_version(&pua_dbf, pua_db, &db_table, PUA_TABLE_VERSION) < 0) {
        LM_ERR("error during table version check.\n");
        return -1;
    }

    if(HASH_SIZE<=1)
        HASH_SIZE= 512;
    else
        HASH_SIZE = 1<<HASH_SIZE;

    HashT= new_htable();
    if(HashT== NULL)
    {
        LM_ERR("while creating new hash table\n");
        return -1;
    }
    if(db_restore()< 0)
    {
        LM_ERR("while restoring hash_table\n");
        return -1;
    }

    if(update_period<=0)
    {
        LM_ERR("wrong clean_period\n");
        return -1;
    }
    if ( init_puacb_list() < 0)
    {
        LM_ERR("callbacks initialization failed\n");
        return -1;
    }
    pua_evlist= init_pua_evlist();
    if(pua_evlist==0)
    {
        LM_ERR("when initializing pua_evlist\n");
        return -1;
    }
    if(pua_add_events()< 0)
    {
        LM_ERR("while adding events\n");
        return -1;
    }

    register_timer("pua_clean", hashT_clean, 0, update_period-5,
                   TIMER_FLAG_DELAY_ON_DELAY);

    register_timer("pua_dbupdate", db_update, 0, update_period,
                   TIMER_FLAG_SKIP_ON_DELAY);


    if(pua_db)
        pua_dbf.close(pua_db);
    pua_db = NULL;

    return 0;
}
开发者ID:vladpaiu,项目名称:opensips,代码行数:101,代码来源:pua.c

示例3: destroy

static void destroy(void)
{
	if (db_handle)
		db_funcs.close(db_handle);
}
开发者ID:Gaoithe,项目名称:openimscore_ims,代码行数:5,代码来源:speeddial.c

示例4: init_addresses

/*
 * Initialize data structures
 */
int init_addresses(void)
{
	if (!db_url.s) {
		LM_INFO("db_url parameter of permissions module not set, "
				"disabling allow_address\n");
		return 0;
	} else {
		if (db_bind_mod(&db_url, &perm_dbf) < 0) {
			LM_ERR("load a database support module\n");
			return -1;
		}

		if (!DB_CAPABILITY(perm_dbf, DB_CAP_QUERY)) {
			LM_ERR("database module does not implement 'query' function\n");
			return -1;
		}
	}

	addr_hash_table_1 = addr_hash_table_2 = 0;
	addr_hash_table = 0;

	db_handle = perm_dbf.init(&db_url);
	if (!db_handle) {
		LM_ERR("unable to connect database\n");
		return -1;
	}

	if(db_check_table_version(&perm_dbf, db_handle, &address_table, TABLE_VERSION) < 0) {
		LM_ERR("error during table version check.\n");
		perm_dbf.close(db_handle);
		return -1;
	}

	addr_hash_table_1 = new_addr_hash_table();
	if (!addr_hash_table_1) return -1;

	addr_hash_table_2  = new_addr_hash_table();
	if (!addr_hash_table_2) goto error;

	addr_hash_table = (struct addr_list ***)shm_malloc
		(sizeof(struct addr_list **));
	if (!addr_hash_table) {
		LM_ERR("no more shm memory for addr_hash_table\n");
		goto error;
	}

	*addr_hash_table = addr_hash_table_1;

	subnet_table_1 = new_subnet_table();
	if (!subnet_table_1) goto error;

	subnet_table_2 = new_subnet_table();
	if (!subnet_table_2) goto error;

	subnet_table = (struct subnet **)shm_malloc(sizeof(struct subnet *));
	if (!subnet_table) {
		LM_ERR("no more shm memory for subnet_table\n");
		goto error;
	}

	*subnet_table = subnet_table_1;

	domain_list_table_1 = new_domain_name_table();
	if (!domain_list_table_1) goto error;

	domain_list_table_2 = new_domain_name_table();
	if (!domain_list_table_2) goto error;

	domain_list_table = (struct domain_name_list ***)shm_malloc(sizeof(struct domain_name_list **));
	if (!domain_list_table) {
		LM_ERR("no more shm memory for domain name table\n");
		goto error;
	}

	*domain_list_table = domain_list_table_1;


	if (reload_address_table() == -1) {
		LM_CRIT("reload of address table failed\n");
		goto error;
	}

	perm_dbf.close(db_handle);
	db_handle = 0;

	return 0;

error:
	if (addr_hash_table_1) {
		free_addr_hash_table(addr_hash_table_1);
		addr_hash_table_1 = 0;
	}
	if (addr_hash_table_2) {
		free_addr_hash_table(addr_hash_table_2);
		addr_hash_table_2 = 0;
	}
	if (addr_hash_table) {
//.........这里部分代码省略.........
开发者ID:AlessioCasco,项目名称:kamailio,代码行数:101,代码来源:address.c

示例5: mod_init

/** Module init function */
static int mod_init(void)
{
	char* p = NULL;
	char* flags = NULL;
	int regexp_flags = 0;
	int i = 0, j;
	pv_spec_t avp_spec;

	LM_DBG("start\n");

	/* load b2b_entities api */
	if(load_b2b_api(&b2b_api)< 0)
	{
		LM_ERR("Failed to load b2b api\n");
		return -1;
	}

	if(b2bl_hsize< 1 || b2bl_hsize> 20)
	{
		LM_ERR("Wrong hash size. Needs to be greater than 1"
				" and smaller than 20. Be aware that you should set the log 2"
				" value of the real size\n");
		return -1;
	}
	b2bl_hsize = 1<<b2bl_hsize;

	if(server_address.s == NULL)
	{
		if(extern_scenarios)
		{
			LM_ERR("'server_address' parameter not set. This parameter is"
				" compulsory if you want to use extern scenarios. It must"
				" be set to the IP address of the machine\n");
			return -1;
		}
	}
	else
		server_address.len = strlen(server_address.s);

	if(init_b2bl_htable() < 0)
	{
		LM_ERR("Failed to initialize b2b logic hash table\n");
		return -1;
	}

	if(b2bl_db_mode && db_url.s)
	{
		db_url.len = strlen(db_url.s);
		b2bl_dbtable.len = strlen(b2bl_dbtable.s);
		/* binding to database module  */
		if (db_bind_mod(&db_url, &b2bl_dbf))
		{
			LM_ERR("Database module not found\n");
			return -1;
		}

		if (!DB_CAPABILITY(b2bl_dbf, DB_CAP_ALL))
		{
			LM_ERR("Database module does not implement all functions"
					" needed by b2b_entities module\n");
			return -1;
		}
		b2bl_db = b2bl_dbf.init(&db_url);
		if(!b2bl_db)
		{
			LM_ERR("connecting to database failed\n");
			return -1;
		}

		/*verify table versions */
		if(db_check_table_version(&b2bl_dbf, b2bl_db, &b2bl_dbtable, TABLE_VERSION) < 0)
		{
			LM_ERR("error during table version check\n");
			return -1;
		}

		b2bl_db_init();

		/* reload data */
		if(b2b_logic_restore() < 0)
		{
			LM_ERR("Failed to restore data from database\n");
			return -1;
		}

		if(b2bl_db)
			b2bl_dbf.close(b2bl_db);
		b2bl_db = NULL;
	}
	else
		b2bl_db_mode = 0;

	if (b2bl_key_avp_param.s)
		b2bl_key_avp_param.len = strlen(b2bl_key_avp_param.s);

	if (b2bl_key_avp_param.s && b2bl_key_avp_param.len > 0)
	{
		if (pv_parse_spec(&b2bl_key_avp_param, &avp_spec)==0 || avp_spec.type!=PVT_AVP) {
			LM_ERR("malformed or non AVP %.*s AVP definition\n",
//.........这里部分代码省略.........
开发者ID:andrey-vorobiev,项目名称:opensips,代码行数:101,代码来源:b2b_logic.c

示例6: destroy

static void destroy(void)
{
	curl_global_cleanup();
	if(xcap_db != NULL)
		xcap_dbf.close(xcap_db);
}
开发者ID:TheGrandWazoo,项目名称:kamailio,代码行数:6,代码来源:xcap_client.c

示例7: mod_init

/**
 * init module function
 */
static int mod_init(void)
{
	DBG("PDT: initializing...\n");

	if(hs_two_pow<0)
	{
		LOG(L_ERR, "PDT:mod_init: hash_size_two_pow must be"
					" positive and less than %d\n", MAX_HSIZE_TWO_POW);
		return -1;
	}

	prefix.len = strlen(prefix.s);

	/* binding to mysql module */
	if(bind_dbmod(db_url, &pdt_dbf))
	{
		LOG(L_ERR, "PDT:mod_init: Database module not found\n");
		return -1;
	}

	if (!DB_CAPABILITY(pdt_dbf, DB_CAP_ALL))
	{
		LOG(L_ERR, "PDT: mod_init: Database module does not "
		    "implement all functions needed by the module\n");
		return -1;
	}

	/* open a connection with the database */
	db_con = pdt_dbf.init(db_url);
	if(db_con==NULL)
	{
		LOG(L_ERR,
			"PDT: mod_init: Error while connecting to database\n");
		return -1;
	}

	if (pdt_dbf.use_table(db_con, db_table) < 0)
	{
		LOG(L_ERR, "PDT: mod_init: Error in use_table\n");
		goto error1;
	}
	DBG("PDT: mod_init: Database connection opened successfully\n");

	/* init the hash and tree in share memory */
	if( (_dhash = pdt_init_hash(hs_two_pow)) == NULL)
	{
		LOG(L_ERR, "PDT:mod_init: domain hash could not be allocated\n");
		goto error1;
	}

	if( (_ptree = pdt_init_tree()) == NULL)
	{
		LOG(L_ERR, "PDT:mod_init: prefix tree could not be allocated\n");
		goto error2;
	}

	/* loading all information from database */
	if(pdt_load_db()!=0)
	{
		LOG(L_ERR, "PDT:mod_init: cannot load info from database\n");
		goto error3;
	}

	pdt_dbf.close(db_con);
	db_con = 0;

	pdt_print_tree(_ptree);
	DBG("PDT:mod_init: -------------------\n");
	pdt_print_hash(_dhash);

	last_sync = time(NULL);

	register_timer(pdt_clean_cache, 0, clean_time);

	/* success code */
	return 0;

error3:
	if(_ptree!=NULL)
	{
		pdt_free_tree(_ptree);
		_ptree = 0;
	}
error2:
	if(_dhash!=NULL)
	{
		pdt_free_hash(_dhash);
		_dhash = 0;
	}
error1:
	if(db_con!=NULL)
	{
		pdt_dbf.close(db_con);
		db_con = 0;
	}
	return -1;
}
开发者ID:BackupTheBerlios,项目名称:openimscore-svn,代码行数:100,代码来源:pdt.c

示例8: mod_init

static int mod_init(void)
{

	LM_INFO("initializing ...\n");

	if(imc_hash_size <= 0)
	{
		LM_ERR("invalid hash size\n");
		return -1;
	}

	imc_hash_size = 1 << imc_hash_size;

	if(imc_htable_init() < 0)
	{
		LM_ERR("initializing hash table\n");
		return -1;
	}

	imc_cmd_start_str.len = strlen(imc_cmd_start_str.s);

	if(outbound_proxy.s)
		outbound_proxy.len = strlen(outbound_proxy.s);

	rooms_table.len = strlen(rooms_table.s);
	members_table.len = strlen(members_table.s);

	/*  binding to mysql module */
	init_db_url( db_url , 0 /*cannot be null*/);
	LM_DBG("db_url=%s/%d/%p\n", ZSW(db_url.s), db_url.len, db_url.s);

	if (db_bind_mod(&db_url, &imc_dbf))
	{
		LM_DBG("database module not found\n");
		return -1;
	}

	imc_db = imc_dbf.init(&db_url);
	if (!imc_db)
	{
		LM_ERR("failed to connect to the database\n");
		return -1;
	}
	/* read the informations stored in db */
	if(add_from_db() <0)
	{
		LM_ERR("failed to get information from db\n");
		return -1;
	}

	/* load TM API */
	if (load_tm_api(&tmb)!=0) {
		LM_ERR("unable to load tm api\n");
		return -1;
	}

	imc_cmd_start_char = imc_cmd_start_str.s[0];

	if(imc_db)
		imc_dbf.close(imc_db);
	imc_db = NULL;

	return 0;
}
开发者ID:NormB,项目名称:opensips,代码行数:64,代码来源:imc.c

示例9: mod_init

/**
 * init module function
 */
static int mod_init(void)
{

	if (xcaps_directory_scheme < -1 || xcaps_directory_scheme > 1)
	{
		LM_ERR("invalid xcaps_directory_scheme\n");
		return -1;
	}

	if(xcaps_buf.len<=0)
	{
		LM_ERR("invalid buffer size\n");
		return -1;
	}

	xcaps_buf.s = (char*)pkg_malloc(xcaps_buf.len+1);
	if(xcaps_buf.s==NULL)
	{
		LM_ERR("no pkg\n");
		return -1;
	}

	/* binding to mysql module  */
	if (db_bind_mod(&xcaps_db_url, &xcaps_dbf))
	{
		LM_ERR("Database module not found\n");
		return -1;
	}

	if (!DB_CAPABILITY(xcaps_dbf, DB_CAP_ALL)) {
		LM_ERR("Database module does not implement all functions"
				" needed by the module\n");
		return -1;
	}

	xcaps_db = xcaps_dbf.init(&xcaps_db_url);
	if (xcaps_db==NULL)
	{
		LM_ERR("connecting to database\n");
		return -1;
	}

	if(db_check_table_version(&xcaps_dbf, xcaps_db, &xcaps_db_table,
				XCAP_TABLE_VERSION) < 0) {
		DB_TABLE_VERSION_ERROR(xcaps_db_table);
		xcaps_dbf.close(xcaps_db);
		xcaps_db = NULL;
		return -1;
	}
	xcaps_dbf.close(xcaps_db);
	xcaps_db = NULL;

	/* bind the SL API */
	if (sl_load_api(&slb)!=0) {
		LM_ERR("cannot bind to SL API\n");
		return -1;
	}

	xcaps_init_time = (int)time(NULL);
	return 0;
}
开发者ID:adubovikov,项目名称:kamailio,代码行数:64,代码来源:xcap_server.c

示例10: destroy

static void destroy(void)
{
	if(xcaps_db != NULL)
		xcaps_dbf.close(xcaps_db);
}
开发者ID:adubovikov,项目名称:kamailio,代码行数:5,代码来源:xcap_server.c

示例11: mod_init


//.........这里部分代码省略.........
	{
		LM_ERR("can't load signaling functions\n");
		return -1;
	}

	bind_presence= (bind_presence_t)find_export("bind_presence", 1,0);
	if (!bind_presence)
	{
		LM_ERR("Can't bind presence\n");
		return -1;
	}
	if (bind_presence(&pres) < 0)
	{
		LM_ERR("Can't bind module pua\n");
		return -1;
	}

	pres_get_sphere= pres.get_sphere;
	pres_add_event= pres.add_event;
	pres_update_watchers= pres.update_watchers_status;
	if (pres_add_event == NULL || pres_update_watchers== NULL)
	{
		LM_ERR("Can't import add_event\n");
		return -1;
	}
	if(xml_add_events()< 0)
	{
		LM_ERR("adding xml events\n");
		return -1;
	}

 	if(pres_rules_auid.s)
        {
                pres_rules_auid.len = strlen(pres_rules_auid.s);
 	        if (pres_rules_auid.len == IETF_PRES_RULES_AUID_LEN &&
 	            strncmp(pres_rules_auid.s, IETF_PRES_RULES_AUID, IETF_PRES_RULES_AUID_LEN) == 0)
                {
                         LM_INFO("using IETF mode for pres-rules\n");
                         pres_rules_doc_id = PRES_RULES;
                }
 	        if (pres_rules_auid.len == OMA_PRES_RULES_AUID_LEN &&
 	            strncmp(pres_rules_auid.s, OMA_PRES_RULES_AUID, OMA_PRES_RULES_AUID_LEN) == 0)
 	        {
                         LM_INFO("using OMA mode for pres-rules\n");
                         pres_rules_doc_id = OMA_PRES_RULES;
 	        }
                else
                {
                         LM_ERR("unrecognized AUID for pres-rules: %.*s\n", pres_rules_auid.len, pres_rules_auid.s);
                         return -1;
                }
        }

	if(force_active== 0 && !integrated_xcap_server )
	{
		xcap_client_api_t xcap_client_api;
		bind_xcap_client_t bind_xcap_client;

		/* bind xcap */
		bind_xcap_client = (bind_xcap_client_t)find_export("bind_xcap_client", 1, 0);
		if (!bind_xcap_client)
		{
			LM_ERR("Can't bind xcap_client\n");
			return -1;
		}

		if (bind_xcap_client(&xcap_client_api) < 0)
		{
			LM_ERR("Can't bind xcap_client_api\n");
			return -1;
		}
		xcap_GetNewDoc= xcap_client_api.getNewDoc;
		if(xcap_GetNewDoc== NULL)
		{
			LM_ERR("can't import getNewDoc from xcap_client module\n");
			return -1;
		}

		if(xcap_client_api.register_xcb(pres_rules_doc_id, xcap_doc_updated) < 0)
		{
			LM_ERR("registering xcap callback function\n");
			return -1;
		}

		if(pres_rules_filename.s)
			pres_rules_filename.len = strlen(pres_rules_filename.s);
	}

	if(shm_copy_xcap_list()< 0)
	{
		LM_ERR("copying xcap server list in share memory\n");
		return -1;
	}

	if(pxml_db)
		pxml_dbf.close(pxml_db);
	pxml_db = NULL;

	return 0;
}
开发者ID:Distrotech,项目名称:opensips,代码行数:101,代码来源:presence_xml.c

示例12: pres_db_close

static void pres_db_close(void) {
	if (pres_dbh) {
		pres_dbf.close(pres_dbh);
		pres_dbh = NULL;
	}
}
开发者ID:TheGrandWazoo,项目名称:kamailio,代码行数:6,代码来源:utils.c

示例13: mod_init


//.........这里部分代码省略.........

	if(subs_dbmode != DB_ONLY) {
		if(shtable_size< 1)
			shtable_size= 512;
		else
			shtable_size= 1<< shtable_size;

		subs_htable= new_shtable(shtable_size);
		if(subs_htable== NULL)
		{
			LM_ERR(" initializing subscribe hash table\n");
			return -1;
		}
		if(restore_db_subs()< 0)
		{
			LM_ERR("restoring subscribe info from database\n");
			return -1;
		}
	}

	if(publ_cache_enabled) {
		if(phtable_size< 1)
			phtable_size= 256;
		else
			phtable_size= 1<< phtable_size;

		pres_htable= new_phtable();
		if(pres_htable== NULL)
		{
			LM_ERR("initializing presentity hash table\n");
			return -1;
		}

		if(pres_htable_restore()< 0)
		{
			LM_ERR("filling in presentity hash table from database\n");
			return -1;
		}
	}

	startup_time = (int) time(NULL);
	if(clean_period>0)
	{
		register_timer(msg_presentity_clean, 0, clean_period);
		register_timer(msg_watchers_clean, 0, clean_period);
	}

	if(db_update_period>0)
		register_timer(timer_db_update, 0, db_update_period);

	if (pres_waitn_time <= 0)
		pres_waitn_time = 5;

	if (pres_notifier_poll_rate <= 0)
		pres_notifier_poll_rate = 10;

	if (pres_notifier_processes < 0 || subs_dbmode != DB_ONLY)
		pres_notifier_processes = 0;

	if (pres_notifier_processes > 0)
	{
		if ((pres_notifier_id = shm_malloc(sizeof(int) * pres_notifier_processes)) == NULL)
		{
			LM_ERR("allocating shared memory\n");
			return -1;
		}

		register_basic_timers(pres_notifier_processes);
	}

	if (pres_force_delete > 0)
		pres_force_delete = 1;

	if (pres_log_facility_str) {
		int tmp = str2facility(pres_log_facility_str);

		if (tmp != -1) {
			pres_local_log_facility = tmp;
		}
		else {
			LM_ERR("invalid log facility configured\n");
			return -1;
		}
	}
	else {
		pres_local_log_facility = cfg_get(core, core_cfg, log_facility);
	}

	if (db_table_lock_type != 1)
		db_table_lock = DB_LOCKING_NONE;

	pa_dbf.close(pa_db);
	pa_db = NULL;

	goto_on_notify_reply=route_lookup(&event_rt, "presence:notify-reply");
	if (goto_on_notify_reply>=0 && event_rt.rlist[goto_on_notify_reply]==0)
		goto_on_notify_reply=-1; /* disable */

	return 0;
}
开发者ID:GreenfieldTech,项目名称:kamailio,代码行数:101,代码来源:presence.c

示例14: mod_destroy

static void mod_destroy(void)
{
	if (db_handle && acc_dbf.close) acc_dbf.close(db_handle);
}
开发者ID:Gaoithe,项目名称:openimscore_ims,代码行数:4,代码来源:acc_db.c

示例15: acc_db_close

/* close a db connection */
void acc_db_close(void)
{
	if (db_handle && acc_dbf.close)
		acc_dbf.close(db_handle);
}
开发者ID:AlessioCasco,项目名称:kamailio,代码行数:6,代码来源:acc.c


注:本文中的db_func_t::close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。