Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
1ad45f70
提交
1ad45f70
authored
10月 08, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
revert
e08f9ada
上级
21d240b2
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
230 行增加
和
351 行删除
+230
-351
switch_core.h
src/include/switch_core.h
+6
-25
switch_types.h
src/include/switch_types.h
+0
-5
switch_core.c
src/switch_core.c
+1
-1
switch_core_sqldb.c
src/switch_core_sqldb.c
+223
-320
没有找到文件。
src/include/switch_core.h
浏览文件 @
1ad45f70
...
...
@@ -2193,11 +2193,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_chat_send(const char *dest_proto, sw
SWITCH_DECLARE
(
switch_status_t
)
switch_core_chat_deliver
(
const
char
*
dest_proto
,
switch_event_t
**
message_event
);
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_preprocess_session
(
switch_core_session_t
*
session
,
const
char
*
cmds
);
SWITCH_DECLARE
(
void
)
switch_sqldb_stop_thread
(
switch_sql_manager_t
*
sql_manager
);
#define switch_core_sqldb_stop_thread() switch_sqldb_stop_thread(&switch_cache_db_sql_manager)
SWITCH_DECLARE
(
void
)
switch_sqldb_start_thread
(
switch_sql_manager_t
*
sql_manager
,
void
*
(
SWITCH_THREAD_FUNC
*
func
)
(
switch_thread_t
*
,
void
*
),
char
**
post_connect_sql
,
int
argc
);
SWITCH_DECLARE
(
void
)
switch_core_sqldb_stop_thread
(
void
);
SWITCH_DECLARE
(
void
)
switch_core_sqldb_start_thread
(
void
);
///\}
...
...
@@ -2244,6 +2240,8 @@ typedef union {
switch_cache_db_pgsql_options_t
pgsql_options
;
}
switch_cache_db_connection_options_t
;
struct
switch_cache_db_handle
;
typedef
struct
switch_cache_db_handle
switch_cache_db_handle_t
;
static
inline
const
char
*
switch_cache_db_type_name
(
switch_cache_db_handle_type_t
type
)
{
...
...
@@ -2283,9 +2281,7 @@ SWITCH_DECLARE(void) switch_cache_db_dismiss_db_handle(switch_cache_db_handle_t
other threads until the allocating thread actually terminates.
\param [in] The handle
*/
SWITCH_DECLARE
(
void
)
_switch_cache_db_release_db_handle
(
switch_sql_manager_t
*
sql_manager
,
switch_cache_db_handle_t
**
dbh
);
SWITCH_DECLARE
(
void
)
switch_cache_db_release_db_handle
(
switch_cache_db_handle_t
**
dbh
);
/*!
\brief Gets a new cached handle from the pool, potentially creating a new connection.
The connection is bound to the thread until it (the thread) terminates unless
...
...
@@ -2294,19 +2290,12 @@ SWITCH_DECLARE(void) switch_cache_db_release_db_handle(switch_cache_db_handle_t
\param [in] type - ODBC or SQLLITE
\param [in] connection_options (userid, password, etc)
*/
SWITCH_DECLARE
(
switch_status_t
)
__switch_cache_db_get_db_handle
(
switch_sql_manager_t
*
sql_manager
,
switch_cache_db_handle_t
**
dbh
,
switch_cache_db_handle_type_t
type
,
switch_cache_db_connection_options_t
*
connection_options
,
const
char
*
file
,
const
char
*
func
,
int
line
);
SWITCH_DECLARE
(
switch_status_t
)
_switch_cache_db_get_db_handle
(
switch_cache_db_handle_t
**
dbh
,
switch_cache_db_handle_type_t
type
,
switch_cache_db_connection_options_t
*
connection_options
,
const
char
*
file
,
const
char
*
func
,
int
line
);
#define switch_cache_db_get_db_handle(_a, _b, _c) _switch_cache_db_get_db_handle(_a, _b, _c, __FILE__, __SWITCH_FUNC__, __LINE__)
/*!
\brief Executes the sql and returns the result as a string
\param [in] dbh The handle
...
...
@@ -2341,21 +2330,15 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_callback(switch_cach
*/
SWITCH_DECLARE
(
int
)
switch_cache_db_affected_rows
(
switch_cache_db_handle_t
*
dbh
);
extern
switch_sql_manager_t
switch_cache_db_sql_manager
;
/*!
\brief Provides some feedback as to the status of the db connection pool
\param [in] stream stream for status
*/
SWITCH_DECLARE
(
void
)
_switch_cache_db_status
(
switch_sql_manager_t
*
sql_manager
,
switch_stream_handle_t
*
stream
);
SWITCH_DECLARE
(
void
)
switch_cache_db_status
(
switch_stream_handle_t
*
stream
);
SWITCH_DECLARE
(
switch_status_t
)
__switch_core_db_handle
(
switch_sql_manager_t
*
sql_manager
,
switch_cache_db_handle_t
**
dbh
,
const
char
*
file
,
const
char
*
func
,
int
line
);
SWITCH_DECLARE
(
switch_status_t
)
_switch_core_db_handle
(
switch_cache_db_handle_t
**
dbh
,
const
char
*
file
,
const
char
*
func
,
int
line
);
#define switch_core_db_handle(_a) _switch_core_db_handle(_a, __FILE__, __SWITCH_FUNC__, __LINE__)
SWITCH_DECLARE
(
switch_status_t
)
_switch_core_recovery_db_handle
(
switch_sql_manager_t
*
sql_manager
,
switch_cache_db_handle_t
**
dbh
,
const
char
*
file
,
const
char
*
func
,
int
line
);
#define switch_core_recovery_db_handle(_a) _switch_core_recovery_db_handle(&switch_cache_db_sql_manager, _a, __FILE__, __SWITCH_FUNC__, __LINE__)
SWITCH_DECLARE
(
switch_status_t
)
_switch_core_persist_db_handle
(
switch_sql_manager_t
*
sql_manager
,
switch_cache_db_handle_t
**
dbh
,
const
char
*
file
,
const
char
*
func
,
int
line
);
#define switch_core_persist_db_handle(_a) _switch_core_persist_db_handle(&switch_cache_db_sql_manager, _a, __FILE__, __SWITCH_FUNC__, __LINE__)
SWITCH_DECLARE
(
switch_status_t
)
_switch_core_recovery_db_handle
(
switch_cache_db_handle_t
**
dbh
,
const
char
*
file
,
const
char
*
func
,
int
line
);
#define switch_core_recovery_db_handle(_a) _switch_core_recovery_db_handle(_a, __FILE__, __SWITCH_FUNC__, __LINE__)
SWITCH_DECLARE
(
switch_bool_t
)
switch_cache_db_test_reactive
(
switch_cache_db_handle_t
*
db
,
const
char
*
test_sql
,
const
char
*
drop_sql
,
const
char
*
reactive_sql
);
...
...
@@ -2364,9 +2347,7 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute_trans(switch_
SWITCH_DECLARE
(
void
)
switch_core_set_signal_handlers
(
void
);
SWITCH_DECLARE
(
uint32_t
)
switch_core_debug_level
(
void
);
SWITCH_DECLARE
(
void
)
switch_cache_db_flush_handles
(
switch_sql_manager_t
*
sql_manager
);
#define switch_core_cache_db_flush_handles() switch_cache_db_flush_handles(&switch_cache_db_sql_manager)
SWITCH_DECLARE
(
void
)
switch_cache_db_flush_handles
(
void
);
SWITCH_DECLARE
(
const
char
*
)
switch_core_banner
(
void
);
SWITCH_DECLARE
(
switch_bool_t
)
switch_core_session_in_thread
(
switch_core_session_t
*
session
);
SWITCH_DECLARE
(
uint32_t
)
switch_default_ptime
(
const
char
*
name
,
uint32_t
number
);
...
...
src/include/switch_types.h
浏览文件 @
1ad45f70
...
...
@@ -1836,11 +1836,6 @@ typedef struct switch_odbc_handle switch_odbc_handle_t;
typedef
struct
switch_pgsql_handle
switch_pgsql_handle_t
;
typedef
struct
switch_pgsql_result
switch_pgsql_result_t
;
struct
switch_cache_db_handle
;
typedef
struct
switch_cache_db_handle
switch_cache_db_handle_t
;
struct
switch_sql_manager
;
typedef
struct
switch_sql_manager
switch_sql_manager_t
;
typedef
struct
switch_io_routines
switch_io_routines_t
;
typedef
struct
switch_speech_handle
switch_speech_handle_t
;
typedef
struct
switch_asr_handle
switch_asr_handle_t
;
...
...
src/switch_core.c
浏览文件 @
1ad45f70
...
...
@@ -2260,7 +2260,7 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, void *
switch_time_calibrate_clock
();
break
;
case
SCSC_FLUSH_DB_HANDLES
:
switch_c
ore_c
ache_db_flush_handles
();
switch_cache_db_flush_handles
();
break
;
case
SCSC_SEND_SIGHUP
:
handle_SIGHUP
(
1
);
...
...
src/switch_core_sqldb.c
浏览文件 @
1ad45f70
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论