Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9e933885
提交
9e933885
authored
5月 03, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
commit
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@1326
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
0a17cada
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
67 行增加
和
60 行删除
+67
-60
modules.conf.in
modules.conf.in
+10
-10
mod_opal.c
src/mod/endpoints/mod_opal/mod_opal.c
+41
-41
mod_syslog.c
src/mod/loggers/mod_syslog/mod_syslog.c
+7
-7
switch_loadable_module.c
src/switch_loadable_module.c
+9
-2
没有找到文件。
modules.conf.in
浏览文件 @
9e933885
loggers/mod_console
#
loggers/mod_syslog
loggers/mod_syslog
applications/mod_commands
applications/mod_bridgecall
applications/mod_echo
#
applications/mod_ivrtest
applications/mod_ivrtest
applications/mod_playback
#
applications/mod_skel
applications/mod_skel
#asr_tts/mod_cepstral
codecs/mod_g711
codecs/mod_ilbc
...
...
@@ -20,17 +20,17 @@ dialplans/mod_pcre
#directories/mod_ldap
endpoints/mod_exosip
endpoints/mod_iax
#
endpoints/mod_dingaling
#
endpoints/mod_opal
#
endpoints/mod_portaudio
#
endpoints/mod_wanpipe
#
endpoints/mod_woomera
endpoints/mod_dingaling
endpoints/mod_opal
endpoints/mod_portaudio
endpoints/mod_wanpipe
endpoints/mod_woomera
#event_handlers/mod_event_multicast
#event_handlers/mod_event_test
#
event_handlers/mod_xmpp_event
event_handlers/mod_xmpp_event
#event_handlers/mod_zeroconf
formats/mod_sndfile
#
languages/mod_perl
languages/mod_perl
#languages/mod_spidermonkey
timers/mod_softtimer
...
...
src/mod/endpoints/mod_opal/mod_opal.c
浏览文件 @
9e933885
...
...
@@ -34,7 +34,7 @@
static
const
char
modname
[]
=
"mod_woomera"
;
static
switch_memory_pool
*
module_pool
=
NULL
;
static
switch_memory_pool
_t
*
module_pool
=
NULL
;
typedef
enum
{
...
...
@@ -53,25 +53,25 @@ struct private_object {
unsigned
int
flags
;
struct
switch_frame
frame
;
unsigned
char
databuf
[
SWITCH_RECCOMMENDED_BUFFER_SIZE
];
switch_core_session
*
session
;
switch_caller_profile
*
caller_profile
;
switch_core_session
_t
*
session
;
switch_caller_profile
_t
*
caller_profile
;
};
static
const
switch_endpoint_interface
channel_endpoint_interface
;
static
const
switch_endpoint_interface
_t
channel_endpoint_interface
;
static
switch_status
channel_on_init
(
switch_core_session
*
session
);
static
switch_status
channel_on_hangup
(
switch_core_session
*
session
);
static
switch_status
channel_on_ring
(
switch_core_session
*
session
);
static
switch_status
channel_on_loopback
(
switch_core_session
*
session
);
static
switch_status
channel_on_transmit
(
switch_core_session
*
session
);
static
switch_status
channel_outgoing_channel
(
switch_core_session
*
session
,
switch_caller_profile
*
outbound_profile
,
switch_core_session
**
new_session
);
static
switch_status
channel_read_frame
(
switch_core_session
*
session
,
switch_frame
**
frame
,
int
timeout
,
static
switch_status
_t
channel_on_init
(
switch_core_session_t
*
session
);
static
switch_status
_t
channel_on_hangup
(
switch_core_session_t
*
session
);
static
switch_status
_t
channel_on_ring
(
switch_core_session_t
*
session
);
static
switch_status
_t
channel_on_loopback
(
switch_core_session_t
*
session
);
static
switch_status
_t
channel_on_transmit
(
switch_core_session_t
*
session
);
static
switch_status
_t
channel_outgoing_channel
(
switch_core_session_t
*
session
,
switch_caller_profile_t
*
outbound_profile
,
switch_core_session
_t
**
new_session
);
static
switch_status
_t
channel_read_frame
(
switch_core_session_t
*
session
,
struct
switch_frame
**
frame
,
int
timeout
,
switch_io_flag
flags
,
int
stream_id
);
static
switch_status
channel_write_frame
(
switch_core_session
*
session
,
switch_frame
*
frame
,
int
timeout
,
static
switch_status
_t
channel_write_frame
(
switch_core_session_t
*
session
,
struct
switch_frame
*
frame
,
int
timeout
,
switch_io_flag
flags
,
int
stream_id
);
static
switch_status
channel_kill_channel
(
switch_core_session
*
session
,
int
sig
);
static
switch_status
_t
channel_kill_channel
(
switch_core_session_t
*
session
,
int
sig
);
/*
...
...
@@ -79,9 +79,9 @@ static switch_status channel_kill_channel(switch_core_session *session, int sig)
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
*/
static
switch_status
channel_on_init
(
switch_core_session
*
session
)
static
switch_status
_t
channel_on_init
(
switch_core_session_t
*
session
)
{
switch_channel
*
channel
;
switch_channel
_t
*
channel
;
struct
private_object
*
tech_pvt
=
NULL
;
tech_pvt
=
switch_core_session_get_private
(
session
);
...
...
@@ -95,9 +95,9 @@ static switch_status channel_on_init(switch_core_session *session)
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
channel_on_ring
(
switch_core_session
*
session
)
static
switch_status
_t
channel_on_ring
(
switch_core_session_t
*
session
)
{
switch_channel
*
channel
=
NULL
;
switch_channel
_t
*
channel
=
NULL
;
struct
private_object
*
tech_pvt
=
NULL
;
channel
=
switch_core_session_get_channel
(
session
);
...
...
@@ -111,10 +111,10 @@ static switch_status channel_on_ring(switch_core_session *session)
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
channel_on_execute
(
switch_core_session
*
session
)
static
switch_status
_t
channel_on_execute
(
switch_core_session_t
*
session
)
{
switch_channel
*
channel
=
NULL
;
switch_channel
_t
*
channel
=
NULL
;
struct
private_object
*
tech_pvt
=
NULL
;
channel
=
switch_core_session_get_channel
(
session
);
...
...
@@ -129,9 +129,9 @@ static switch_status channel_on_execute(switch_core_session *session)
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
channel_on_hangup
(
switch_core_session
*
session
)
static
switch_status
_t
channel_on_hangup
(
switch_core_session_t
*
session
)
{
switch_channel
*
channel
=
NULL
;
switch_channel
_t
*
channel
=
NULL
;
struct
private_object
*
tech_pvt
=
NULL
;
channel
=
switch_core_session_get_channel
(
session
);
...
...
@@ -146,9 +146,9 @@ static switch_status channel_on_hangup(switch_core_session *session)
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
channel_kill_channel
(
switch_core_session
*
session
,
int
sig
)
static
switch_status
_t
channel_kill_channel
(
switch_core_session_t
*
session
,
int
sig
)
{
switch_channel
*
channel
=
NULL
;
switch_channel
_t
*
channel
=
NULL
;
struct
private_object
*
tech_pvt
=
NULL
;
channel
=
switch_core_session_get_channel
(
session
);
...
...
@@ -164,13 +164,13 @@ static switch_status channel_kill_channel(switch_core_session *session, int sig)
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
channel_on_loopback
(
switch_core_session
*
session
)
static
switch_status
_t
channel_on_loopback
(
switch_core_session_t
*
session
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"CHANNEL LOOPBACK
\n
"
);
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
channel_on_transmit
(
switch_core_session
*
session
)
static
switch_status
_t
channel_on_transmit
(
switch_core_session_t
*
session
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"CHANNEL TRANSMIT
\n
"
);
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -180,13 +180,13 @@ static switch_status channel_on_transmit(switch_core_session *session)
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static
switch_status
channel_outgoing_channel
(
switch_core_session
*
session
,
switch_caller_profile
*
outbound_profile
,
switch_core_session
**
new_session
)
static
switch_status
_t
channel_outgoing_channel
(
switch_core_session_t
*
session
,
switch_caller_profile_t
*
outbound_profile
,
switch_core_session
_t
**
new_session
)
{
if
((
*
new_session
=
switch_core_session_request
(
&
channel_endpoint_interface
,
NULL
)))
{
struct
private_object
*
tech_pvt
;
switch_channel
*
channel
,
*
orig_channel
;
switch_caller_profile
*
caller_profile
,
*
originator_caller_profile
=
NULL
;
switch_channel
_t
*
channel
,
*
orig_channel
;
switch_caller_profile
_t
*
caller_profile
,
*
originator_caller_profile
=
NULL
;
switch_core_session_add_stream
(
*
new_session
,
NULL
);
if
((
tech_pvt
=
...
...
@@ -216,7 +216,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
/* (session == NULL) means it was originated from the core not from another channel */
if
(
session
&&
(
orig_channel
=
switch_core_session_get_channel
(
session
)))
{
switch_caller_profile
*
cloned_profile
;
switch_caller_profile
_t
*
cloned_profile
;
if
((
originator_caller_profile
=
switch_channel_get_caller_profile
(
orig_channel
)))
{
cloned_profile
=
switch_caller_profile_clone
(
*
new_session
,
originator_caller_profile
);
...
...
@@ -234,7 +234,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
}
static
switch_status
channel_waitfor_read
(
switch_core_session
*
session
,
int
ms
,
int
stream_id
)
static
switch_status
_t
channel_waitfor_read
(
switch_core_session_t
*
session
,
int
ms
,
int
stream_id
)
{
struct
private_object
*
tech_pvt
=
NULL
;
...
...
@@ -244,7 +244,7 @@ static switch_status channel_waitfor_read(switch_core_session *session, int ms,
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
channel_waitfor_write
(
switch_core_session
*
session
,
int
ms
,
int
stream_id
)
static
switch_status
_t
channel_waitfor_write
(
switch_core_session_t
*
session
,
int
ms
,
int
stream_id
)
{
struct
private_object
*
tech_pvt
=
NULL
;
...
...
@@ -255,13 +255,13 @@ static switch_status channel_waitfor_write(switch_core_session *session, int ms,
}
static
switch_status
channel_read_frame
(
switch_core_session
*
session
,
switch_frame
**
frame
,
int
timeout
,
static
switch_status
_t
channel_read_frame
(
switch_core_session_t
*
session
,
switch_frame
**
frame
,
int
timeout
,
switch_io_flag
flags
,
int
stream_id
)
{
switch_channel
*
channel
=
NULL
;
switch_channel
_t
*
channel
=
NULL
;
struct
private_object
*
tech_pvt
=
NULL
;
//switch_frame *pframe;
//switch_status status;
//switch_status
_t
status;
channel
=
switch_core_session_get_channel
(
session
);
assert
(
channel
!=
NULL
);
...
...
@@ -272,10 +272,10 @@ static switch_status channel_read_frame(switch_core_session *session, switch_fra
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
channel_write_frame
(
switch_core_session
*
session
,
switch_frame
*
frame
,
int
timeout
,
static
switch_status
_t
channel_write_frame
(
switch_core_session_t
*
session
,
switch_frame
*
frame
,
int
timeout
,
switch_io_flag
flags
,
int
stream_id
)
{
switch_channel
*
channel
=
NULL
;
switch_channel
_t
*
channel
=
NULL
;
struct
private_object
*
tech_pvt
=
NULL
;
//switch_frame *pframe;
...
...
@@ -330,7 +330,7 @@ static const switch_loadable_module_interface channel_module_interface = {
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status
_t
) switch_module_shutdown(void)
{
int x = 0;
opal_profile_thread_running(&default_profile, 1, 0);
...
...
@@ -345,7 +345,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
}
*/
SWITCH_MOD_DECLARE
(
switch_status
)
switch_module_load
(
const
switch_loadable_module_interface
**
interface
,
char
*
filename
)
SWITCH_MOD_DECLARE
(
switch_status
_t
)
switch_module_load
(
const
switch_loadable_module_interface
**
interface
,
char
*
filename
)
{
switch_config
cfg
;
...
...
@@ -387,7 +387,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
SWITCH_MOD_DECLARE
(
switch_status
)
switch_module_runtime
(
void
)
SWITCH_MOD_DECLARE
(
switch_status
_t
)
switch_module_runtime
(
void
)
{
return
SWITCH_STATUS_TERM
;
...
...
src/mod/loggers/mod_syslog/mod_syslog.c
浏览文件 @
9e933885
...
...
@@ -40,7 +40,7 @@
#define MAX_LENGTH 1024
static
const
char
modname
[]
=
"mod_syslog"
;
static
switch_status
load_config
(
void
);
static
switch_status
_t
load_config
(
void
);
static
struct
{
char
*
ident
;
...
...
@@ -54,7 +54,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_level, globals.level)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_format
,
globals
.
format
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_facility
,
globals
.
facility
)
static
switch_loadable_module_interface
console_module_interface
=
{
static
switch_loadable_module_interface
_t
console_module_interface
=
{
/*.module_name */
modname
,
/*.endpoint_interface */
NULL
,
/*.timer_interface */
NULL
,
...
...
@@ -67,7 +67,7 @@ static switch_loadable_module_interface console_module_interface = {
/*.directory_interface */
NULL
};
static
switch_status
mod_syslog_logger
(
const
switch_log_node
*
node
,
switch_log_level
level
)
static
switch_status
_t
mod_syslog_logger
(
const
switch_log_node_t
*
node
,
switch_log_level_t
level
)
{
char
*
message
=
NULL
;
char
line_no
[
sizeof
(
int
)
*
8
+
1
];
...
...
@@ -103,7 +103,7 @@ static switch_status mod_syslog_logger(const switch_log_node *node, switch_log_l
return
SWITCH_STATUS_SUCCESS
;
}
SWITCH_MOD_DECLARE
(
switch_status
)
switch_module_load
(
const
switch_loadable_module_interface
**
interface
,
char
*
filename
)
SWITCH_MOD_DECLARE
(
switch_status
_t
)
switch_module_load
(
const
switch_loadable_module_interface_t
**
interface
,
char
*
filename
)
{
*
interface
=
&
console_module_interface
;
...
...
@@ -116,16 +116,16 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
return
SWITCH_STATUS_SUCCESS
;
}
SWITCH_MOD_DECLARE
(
switch_status
)
switch_module_unload
(
const
switch_loadable_module_interface
**
interface
)
SWITCH_MOD_DECLARE
(
switch_status
_t
)
switch_module_unload
(
const
switch_loadable_module_interface_t
**
interface
)
{
closelog
();
return
SWITCH_STATUS_SUCCESS
;
}
static
switch_status
load_config
(
void
)
static
switch_status
_t
load_config
(
void
)
{
switch_config
cfg
;
switch_config
_t
cfg
;
char
*
var
,
*
val
;
char
*
cf
=
"syslog.conf"
;
...
...
src/switch_loadable_module.c
浏览文件 @
9e933885
...
...
@@ -30,7 +30,7 @@
*
*/
#include <switch.h>
#include <ctype.h>
struct
switch_loadable_module
{
char
*
filename
;
...
...
@@ -568,7 +568,14 @@ SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoin
SWITCH_DECLARE
(
switch_codec_interface_t
*
)
switch_loadable_module_get_codec_interface
(
char
*
name
)
{
return
switch_core_hash_find
(
loadable_modules
.
codec_hash
,
name
);
char
ucname
[
256
]
=
""
;
int
x
;
for
(
x
=
0
;
x
<
strlen
(
name
);
x
++
)
{
ucname
[
x
]
=
toupper
(
name
[
x
]);
}
return
switch_core_hash_find
(
loadable_modules
.
codec_hash
,
ucname
);
}
SWITCH_DECLARE
(
switch_dialplan_interface_t
*
)
switch_loadable_module_get_dialplan_interface
(
char
*
name
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论