在测试FREEESWITCH
1.0.19版本时候发现一个问题,会引起odbc过多连接,导致无法创建新连接问题。查找代码发现应该是下面的函数没有去掉连接的使用标志。
SWITCH_DECLARE(void)
switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh)
{
if(dbh && *dbh)
{
switch_clear_flag(*dbh, CDF_INUSE); //去掉使用状态标志
switch_mutex_unlock((*dbh)->mutex);
*dbh = NULL;
}
}
王洪永
中企开源-IP通讯部
Mon, 28 Jun 2010 09:19:50 +0800