Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
b099f96e
提交
b099f96e
authored
10月 17, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
format
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@5925
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
511a6292
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
133 行增加
和
132 行删除
+133
-132
switch_utils.h
src/include/switch_utils.h
+1
-1
mod_dialplan_directory.c
...dialplans/mod_dialplan_directory/mod_dialplan_directory.c
+7
-7
mod_alsa.c
src/mod/endpoints/mod_alsa/mod_alsa.c
+7
-7
mod_dingaling.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
+3
-3
mod_iax.c
src/mod/endpoints/mod_iax/mod_iax.c
+39
-39
mod_portaudio.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
+39
-38
mod_event_multicast.c
.../event_handlers/mod_event_multicast/mod_event_multicast.c
+3
-3
mod_event_socket.c
src/mod/event_handlers/mod_event_socket/mod_event_socket.c
+11
-11
mod_syslog.c
src/mod/loggers/mod_syslog/mod_syslog.c
+17
-17
mod_xml_rpc.c
src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
+6
-6
没有找到文件。
src/include/switch_utils.h
浏览文件 @
b099f96e
...
...
@@ -286,7 +286,7 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(const char *in);
\param vname the name of the global pointer to modify with the new function
*/
#define SWITCH_DECLARE_GLOBAL_STRING_FUNC(fname, vname) static void fname(char *string) { if (!string) return;\
if (vname) {free(vname); vname = NULL;}vname = strdup(string);}
if (vname) {free(vname); vname = NULL;}vname = strdup(string);} static void fname(char *string)
/*!
\brief Separate a string into an array based on a character delimeter
...
...
src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
浏览文件 @
b099f96e
...
...
@@ -45,13 +45,13 @@ static struct {
char
*
base
;
}
globals
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_directory_name
,
globals
.
directory_name
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_host
,
globals
.
host
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dn
,
globals
.
dn
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_pass
,
globals
.
pass
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_base
,
globals
.
base
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_directory_name
,
globals
.
directory_name
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_host
,
globals
.
host
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dn
,
globals
.
dn
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_pass
,
globals
.
pass
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_base
,
globals
.
base
);
static
void
load_config
(
void
)
static
void
load_config
(
void
)
{
char
*
cf
=
"dialplan_directory.conf"
;
switch_xml_t
cfg
,
xml
,
settings
,
param
;
...
...
@@ -138,7 +138,7 @@ SWITCH_STANDARD_DIALPLAN(directory_dialplan_hunt)
}
}
}
out
:
out
:
switch_core_directory_close
(
&
dh
);
...
...
src/mod/endpoints/mod_alsa/mod_alsa.c
浏览文件 @
b099f96e
...
...
@@ -130,13 +130,13 @@ static struct {
#define PA_SLAVE 0
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
)
//
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_cid_name
,
globals
.
cid_name
)
//
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_cid_num
,
globals
.
cid_num
)
//
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ring_file
,
globals
.
ring_file
)
//
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_hold_file
,
globals
.
hold_file
)
//
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_timer_name
,
globals
.
timer_name
)
//
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_device_name
,
globals
.
device_name
)
//
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_cid_name
,
globals
.
cid_name
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_cid_num
,
globals
.
cid_num
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ring_file
,
globals
.
ring_file
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_hold_file
,
globals
.
hold_file
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_timer_name
,
globals
.
timer_name
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_device_name
,
globals
.
device_name
);
#define is_master(t) switch_test_flag(t, TFLAG_MASTER)
static
void
add_pvt
(
private_t
*
tech_pvt
,
int
master
);
...
...
src/mod/endpoints/mod_dingaling/mod_dingaling.c
浏览文件 @
b099f96e
...
...
@@ -191,9 +191,9 @@ struct rfc2833_digit {
};
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_string
,
globals
.
codec_string
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_rates_string
,
globals
.
codec_rates_string
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_string
,
globals
.
codec_string
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_rates_string
,
globals
.
codec_rates_string
)
;
static
switch_status_t
dl_login
(
const
char
*
arg
,
switch_core_session_t
*
session
,
switch_stream_handle_t
*
stream
);
static
switch_status_t
dl_logout
(
const
char
*
profile_name
,
switch_core_session_t
*
session
,
switch_stream_handle_t
*
stream
);
...
...
src/mod/endpoints/mod_iax/mod_iax.c
浏览文件 @
b099f96e
...
...
@@ -101,22 +101,22 @@ struct private_object {
typedef
struct
private_object
private_t
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_string
,
globals
.
codec_string
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_rates_string
,
globals
.
codec_rates_string
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ip
,
globals
.
ip
)
static
char
*
IAXNAMES
[]
=
{
"IAX_EVENT_CONNECT"
,
"IAX_EVENT_ACCEPT"
,
"IAX_EVENT_HANGUP"
,
"IAX_EVENT_REJECT"
,
"IAX_EVENT_VOICE"
,
"IAX_EVENT_DTMF"
,
"IAX_EVENT_TIMEOUT"
,
"IAX_EVENT_LAGRQ"
,
"IAX_EVENT_LAGRP"
,
"IAX_EVENT_RINGA"
,
"IAX_EVENT_PING"
,
"IAX_EVENT_PONG"
,
"IAX_EVENT_BUSY"
,
"IAX_EVENT_ANSWER"
,
"IAX_EVENT_IMAGE"
,
"IAX_EVENT_AUTHRQ"
,
"IAX_EVENT_AUTHRP"
,
"IAX_EVENT_REGREQ"
,
"IAX_EVENT_REGACK"
,
"IAX_EVENT_URL"
,
"IAX_EVENT_LDCOMPLETE"
,
"IAX_EVENT_TRANSFER"
,
"IAX_EVENT_DPREQ"
,
"IAX_EVENT_DPREP"
,
"IAX_EVENT_DIAL"
,
"IAX_EVENT_QUELCH"
,
"IAX_EVENT_UNQUELCH"
,
"IAX_EVENT_UNLINK"
,
"IAX_EVENT_LINKREJECT"
,
"IAX_EVENT_TEXT"
,
"IAX_EVENT_REGREJ"
,
"IAX_EVENT_LINKURL"
,
"IAX_EVENT_CNG"
,
"IAX_EVENT_REREQUEST"
,
"IAX_EVENT_TXREPLY"
,
"IAX_EVENT_TXREJECT"
,
"IAX_EVENT_TXACCEPT"
,
"IAX_EVENT_TXREADY"
};
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_string
,
globals
.
codec_string
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_codec_rates_string
,
globals
.
codec_rates_string
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ip
,
globals
.
ip
);
static
char
*
IAXNAMES
[]
=
{
"IAX_EVENT_CONNECT"
,
"IAX_EVENT_ACCEPT"
,
"IAX_EVENT_HANGUP"
,
"IAX_EVENT_REJECT"
,
"IAX_EVENT_VOICE"
,
"IAX_EVENT_DTMF"
,
"IAX_EVENT_TIMEOUT"
,
"IAX_EVENT_LAGRQ"
,
"IAX_EVENT_LAGRP"
,
"IAX_EVENT_RINGA"
,
"IAX_EVENT_PING"
,
"IAX_EVENT_PONG"
,
"IAX_EVENT_BUSY"
,
"IAX_EVENT_ANSWER"
,
"IAX_EVENT_IMAGE"
,
"IAX_EVENT_AUTHRQ"
,
"IAX_EVENT_AUTHRP"
,
"IAX_EVENT_REGREQ"
,
"IAX_EVENT_REGACK"
,
"IAX_EVENT_URL"
,
"IAX_EVENT_LDCOMPLETE"
,
"IAX_EVENT_TRANSFER"
,
"IAX_EVENT_DPREQ"
,
"IAX_EVENT_DPREP"
,
"IAX_EVENT_DIAL"
,
"IAX_EVENT_QUELCH"
,
"IAX_EVENT_UNQUELCH"
,
"IAX_EVENT_UNLINK"
,
"IAX_EVENT_LINKREJECT"
,
"IAX_EVENT_TEXT"
,
"IAX_EVENT_REGREJ"
,
"IAX_EVENT_LINKURL"
,
"IAX_EVENT_CNG"
,
"IAX_EVENT_REREQUEST"
,
"IAX_EVENT_TXREPLY"
,
"IAX_EVENT_TXREJECT"
,
"IAX_EVENT_TXACCEPT"
,
"IAX_EVENT_TXREADY"
};
struct
ast_iana
{
...
...
@@ -127,24 +127,24 @@ struct ast_iana {
//999 means it's wrong nad i dont know the real one
static
struct
ast_iana
AST_IANA
[]
=
{
{
AST_FORMAT_G723_1
,
4
,
"g723.1"
},
{
AST_FORMAT_GSM
,
3
,
"gsm"
},
{
AST_FORMAT_ULAW
,
0
,
"ulaw"
},
{
AST_FORMAT_ALAW
,
8
,
"alaw"
},
{
AST_FORMAT_G726
,
999
,
"g726"
},
{
AST_FORMAT_ADPCM
,
999
,
"adpcm"
},
{
AST_FORMAT_SLINEAR
,
10
,
"slinear"
},
{
AST_FORMAT_LPC10
,
7
,
"lpc10"
},
{
AST_FORMAT_G729A
,
18
,
"g729"
},
{
AST_FORMAT_SPEEX
,
97
,
"speex"
},
{
AST_FORMAT_SPEEX
,
98
,
"speex"
},
{
AST_FORMAT_ILBC
,
102
,
"ilbc"
},
{
AST_FORMAT_MAX_AUDIO
,
999
,
""
},
{
AST_FORMAT_JPEG
,
999
,
""
},
{
AST_FORMAT_PNG
,
999
,
""
},
{
AST_FORMAT_H261
,
999
,
""
},
{
AST_FORMAT_H263
,
999
,
""
},
{
AST_FORMAT_MAX_VIDEO
,
999
,
""
},
{
0
,
0
}
{
AST_FORMAT_GSM
,
3
,
"gsm"
},
{
AST_FORMAT_ULAW
,
0
,
"ulaw"
},
{
AST_FORMAT_ALAW
,
8
,
"alaw"
},
{
AST_FORMAT_G726
,
999
,
"g726"
},
{
AST_FORMAT_ADPCM
,
999
,
"adpcm"
},
{
AST_FORMAT_SLINEAR
,
10
,
"slinear"
},
{
AST_FORMAT_LPC10
,
7
,
"lpc10"
},
{
AST_FORMAT_G729A
,
18
,
"g729"
},
{
AST_FORMAT_SPEEX
,
97
,
"speex"
},
{
AST_FORMAT_SPEEX
,
98
,
"speex"
},
{
AST_FORMAT_ILBC
,
102
,
"ilbc"
},
{
AST_FORMAT_MAX_AUDIO
,
999
,
""
},
{
AST_FORMAT_JPEG
,
999
,
""
},
{
AST_FORMAT_PNG
,
999
,
""
},
{
AST_FORMAT_H261
,
999
,
""
},
{
AST_FORMAT_H263
,
999
,
""
},
{
AST_FORMAT_MAX_VIDEO
,
999
,
""
},
{
0
,
0
}
};
static
char
*
ast2str
(
int
ast
)
...
...
@@ -449,9 +449,9 @@ static void tech_init(private_t * tech_pvt, switch_core_session_t *session)
}
/*
State methods they get called when the state changes to the specific state
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.
State methods they get called when the state changes to the specific state
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_t
channel_on_init
(
switch_core_session_t
*
session
)
{
...
...
@@ -695,7 +695,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
return
SWITCH_STATUS_FALSE
;
cng:
cng:
data
=
(
switch_byte_t
*
)
tech_pvt
->
read_frame
.
data
;
data
[
0
]
=
65
;
data
[
1
]
=
0
;
...
...
@@ -784,7 +784,7 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
}
/* 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!
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static
switch_call_cause_t
channel_outgoing_channel
(
switch_core_session_t
*
session
,
switch_caller_profile_t
*
outbound_profile
,
...
...
src/mod/endpoints/mod_portaudio/mod_portaudio.c
浏览文件 @
b099f96e
...
...
@@ -128,41 +128,42 @@ static struct {
#define PA_SLAVE 0
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_cid_name
,
globals
.
cid_name
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_cid_num
,
globals
.
cid_num
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ring_file
,
globals
.
ring_file
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_hold_file
,
globals
.
hold_file
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_timer_name
,
globals
.
timer_name
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_dialplan
,
globals
.
dialplan
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_cid_name
,
globals
.
cid_name
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_cid_num
,
globals
.
cid_num
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ring_file
,
globals
.
ring_file
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_hold_file
,
globals
.
hold_file
);
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_timer_name
,
globals
.
timer_name
);
#define is_master(t) switch_test_flag(t, TFLAG_MASTER)
static
void
add_pvt
(
private_t
*
tech_pvt
,
int
master
);
static
void
remove_pvt
(
private_t
*
tech_pvt
);
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_call_cause_t
channel_outgoing_channel
(
switch_core_session_t
*
session
,
switch_caller_profile_t
*
outbound_profile
,
switch_core_session_t
**
new_session
,
switch_memory_pool_t
**
pool
);
static
switch_status_t
channel_read_frame
(
switch_core_session_t
*
session
,
switch_frame_t
**
frame
,
int
timeout
,
switch_io_flag_t
flags
,
int
stream_id
);
static
switch_status_t
channel_write_frame
(
switch_core_session_t
*
session
,
switch_frame_t
*
frame
,
int
timeout
,
switch_io_flag_t
flags
,
int
stream_id
);
static
switch_status_t
channel_kill_channel
(
switch_core_session_t
*
session
,
int
sig
);
static
switch_status_t
engage_device
(
int
samplerate
,
int
codec_ms
);
static
switch_status_t
engage_ring_device
(
int
sample_rate
,
int
channels
);
static
void
deactivate_ring_device
(
void
);
static
int
dump_info
(
void
);
static
switch_status_t
load_config
(
void
);
static
int
get_dev_by_name
(
char
*
name
,
int
in
);
static
int
get_dev_by_number
(
int
number
,
int
in
);
static
switch_status_t
pa_cmd
(
const
char
*
dest
,
switch_core_session_t
*
session
,
switch_stream_handle_t
*
stream
);
static
void
add_pvt
(
private_t
*
tech_pvt
,
int
master
);
static
void
remove_pvt
(
private_t
*
tech_pvt
);
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_call_cause_t
channel_outgoing_channel
(
switch_core_session_t
*
session
,
switch_caller_profile_t
*
outbound_profile
,
switch_core_session_t
**
new_session
,
switch_memory_pool_t
**
pool
);
static
switch_status_t
channel_read_frame
(
switch_core_session_t
*
session
,
switch_frame_t
**
frame
,
int
timeout
,
switch_io_flag_t
flags
,
int
stream_id
);
static
switch_status_t
channel_write_frame
(
switch_core_session_t
*
session
,
switch_frame_t
*
frame
,
int
timeout
,
switch_io_flag_t
flags
,
int
stream_id
);
static
switch_status_t
channel_kill_channel
(
switch_core_session_t
*
session
,
int
sig
);
static
switch_status_t
engage_device
(
int
samplerate
,
int
codec_ms
);
static
switch_status_t
engage_ring_device
(
int
sample_rate
,
int
channels
);
static
void
deactivate_ring_device
(
void
);
static
int
dump_info
(
void
);
static
switch_status_t
load_config
(
void
);
static
int
get_dev_by_name
(
char
*
name
,
int
in
);
static
int
get_dev_by_number
(
int
number
,
int
in
);
static
switch_status_t
pa_cmd
(
const
char
*
dest
,
switch_core_session_t
*
session
,
switch_stream_handle_t
*
stream
);
/*
State methods they get called when the state changes to the specific state
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_t
channel_on_init
(
switch_core_session_t
*
session
)
static
switch_status_t
channel_on_init
(
switch_core_session_t
*
session
)
{
switch_channel_t
*
channel
;
private_t
*
tech_pvt
=
NULL
;
...
...
@@ -583,12 +584,12 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
goto
hold
;
}
cng:
cng:
switch_yield
(
globals
.
read_codec
.
implementation
->
microseconds_per_frame
);
*
frame
=
&
globals
.
cng_frame
;
return
SWITCH_STATUS_SUCCESS
;
hold:
hold:
{
switch_size_t
olen
=
globals
.
read_codec
.
implementation
->
samples_per_frame
;
...
...
@@ -1040,7 +1041,7 @@ static void PrintSupportedStandardSampleRates(const PaStreamParameters * inputPa
int
i
,
printCount
,
cr
=
7
;
PaError
err
;
static
double
standardSampleRates
[]
=
{
8000
.
0
,
9600
.
0
,
11025
.
0
,
12000
.
0
,
16000
.
0
,
22050
.
0
,
24000
.
0
,
32000
.
0
,
44100
.
0
,
48000
.
0
,
88200
.
0
,
96000
.
0
,
192000
.
0
,
-
1
44100
.
0
,
48000
.
0
,
88200
.
0
,
96000
.
0
,
192000
.
0
,
-
1
};
printCount
=
cr
;
...
...
@@ -1184,7 +1185,7 @@ static int dump_info(void)
return
0
;
error
:
error
:
switch_log_printf
(
SWITCH_CHANNEL_LOG_CLEAN
,
SWITCH_LOG_ERROR
,
"An error occured while using the portaudio stream
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG_CLEAN
,
SWITCH_LOG_ERROR
,
"Error number: %d
\n
"
,
err
);
switch_log_printf
(
SWITCH_CHANNEL_LOG_CLEAN
,
SWITCH_LOG_ERROR
,
"Error message: %s
\n
"
,
Pa_GetErrorText
(
err
));
...
...
@@ -1370,7 +1371,7 @@ static switch_status_t switch_call(char **argv, int argc, switch_stream_handle_t
stream
->
write_function
(
stream
,
"NO SUCH CALL
\n
"
);
}
done
:
done
:
switch_mutex_unlock
(
globals
.
pvt_lock
);
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -1436,7 +1437,7 @@ static switch_status_t answer_call(char **argv, int argc, switch_stream_handle_t
break
;
}
}
done
:
done
:
switch_mutex_unlock
(
globals
.
pvt_lock
);
stream
->
write_function
(
stream
,
"Answered %d channels.
\n
"
,
x
);
...
...
@@ -1490,7 +1491,7 @@ static switch_status_t do_flags(char **argv, int argc, switch_stream_handle_t *s
goto
bad
;
}
desc
:
desc
:
x
=
0
;
stream
->
write_function
(
stream
,
"FLAGS: "
);
if
(
switch_test_flag
((
&
globals
),
GFLAG_EAR
))
{
...
...
@@ -1507,9 +1508,9 @@ static switch_status_t do_flags(char **argv, int argc, switch_stream_handle_t *s
goto
done
;
bad
:
bad
:
stream
->
write_function
(
stream
,
"Usage: flags [on|off] <flags>
\n
"
);
done
:
done
:
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -1796,7 +1797,7 @@ SWITCH_STANDARD_API(pa_cmd)
}
}
done
:
done
:
if
(
http
)
{
...
...
src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
浏览文件 @
b099f96e
...
...
@@ -53,10 +53,10 @@ static struct {
int
running
;
}
globals
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_address
,
globals
.
address
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_bindings
,
globals
.
bindings
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_address
,
globals
.
address
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_bindings
,
globals
.
bindings
);
#define MULTICAST_EVENT "multicast::event"
static
switch_status_t
load_config
(
void
)
static
switch_status_t
load_config
(
void
)
{
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
char
*
cf
=
"event_multicast.conf"
;
...
...
src/mod/event_handlers/mod_event_socket/mod_event_socket.c
浏览文件 @
b099f96e
...
...
@@ -91,13 +91,13 @@ static struct {
int
threads
;
}
prefs
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_pref_ip
,
prefs
.
ip
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_pref_pass
,
prefs
.
password
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_pref_ip
,
prefs
.
ip
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_pref_pass
,
prefs
.
password
);
static
void
*
SWITCH_THREAD_FUNC
listener_run
(
switch_thread_t
*
thread
,
void
*
obj
);
static
void
launch_listener_thread
(
listener_t
*
listener
);
static
void
*
SWITCH_THREAD_FUNC
listener_run
(
switch_thread_t
*
thread
,
void
*
obj
);
static
void
launch_listener_thread
(
listener_t
*
listener
);
static
switch_status_t
socket_logger
(
const
switch_log_node_t
*
node
,
switch_log_level_t
level
)
static
switch_status_t
socket_logger
(
const
switch_log_node_t
*
node
,
switch_log_level_t
level
)
{
listener_t
*
l
;
...
...
@@ -565,7 +565,7 @@ static void *SWITCH_THREAD_FUNC api_exec(switch_thread_t * thread, void *obj)
switch_thread_rwlock_unlock
(
acs
->
listener
->
rwlock
);
}
done:
done:
if
(
acs
&&
acs
->
bg
)
{
switch_memory_pool_t
*
pool
=
acs
->
pool
;
acs
=
NULL
;
...
...
@@ -875,7 +875,7 @@ static switch_status_t parse_command(listener_t * listener, switch_event_t *even
}
}
end:
end:
cur
=
next
;
}
}
...
...
@@ -964,7 +964,7 @@ static switch_status_t parse_command(listener_t * listener, switch_event_t *even
}
}
done:
done:
if
(
event
)
{
switch_event_destroy
(
&
event
);
}
...
...
@@ -1102,7 +1102,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t * thread, void *obj
}
done:
done:
remove_listener
(
listener
);
...
...
@@ -1225,7 +1225,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime)
goto
sock_fail
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Socket up listening on %s:%u
\n
"
,
prefs
.
ip
,
prefs
.
port
);
break
;
sock_fail
:
sock_fail
:
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Socket Error!
\n
"
);
switch_yield
(
100000
);
}
...
...
@@ -1284,7 +1284,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime)
switch_core_destroy_memory_pool
(
&
listener_pool
);
}
fail
:
fail
:
return
SWITCH_STATUS_TERM
;
}
...
...
src/mod/loggers/mod_syslog/mod_syslog.c
浏览文件 @
b099f96e
...
...
@@ -52,23 +52,23 @@ static struct {
char
*
format
;
}
globals
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ident
,
globals
.
ident
)
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_t
console_module_interface
=
{
/*.module_name */
modname
,
/*.endpoint_interface */
NULL
,
/*.timer_interface */
NULL
,
/*.dialplan_interface */
NULL
,
/*.codec_interface */
NULL
,
/*.application_interface */
NULL
,
/*.api_interface */
NULL
,
/*.file_interface */
NULL
,
/*.speech_interface */
NULL
,
/*.directory_interface */
NULL
};
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_ident
,
globals
.
ident
)
;
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_t
console_module_interface
=
{
/*.module_name */
modname
,
/*.endpoint_interface */
NULL
,
/*.timer_interface */
NULL
,
/*.dialplan_interface */
NULL
,
/*.codec_interface */
NULL
,
/*.application_interface */
NULL
,
/*.api_interface */
NULL
,
/*.file_interface */
NULL
,
/*.speech_interface */
NULL
,
/*.directory_interface */
NULL
};
static
switch_status_t
mod_syslog_logger
(
const
switch_log_node_t
*
node
,
switch_log_level_t
level
)
{
...
...
src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
浏览文件 @
b099f96e
...
...
@@ -55,11 +55,11 @@ static struct {
char
*
pass
;
}
globals
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_realm
,
globals
.
realm
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_user
,
globals
.
user
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_pass
,
globals
.
pass
)
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_realm
,
globals
.
realm
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_user
,
globals
.
user
)
;
SWITCH_DECLARE_GLOBAL_STRING_FUNC
(
set_global_pass
,
globals
.
pass
)
;
static
switch_status_t
do_config
(
void
)
static
switch_status_t
do_config
(
void
)
{
char
*
cf
=
"xml_rpc.conf"
;
switch_xml_t
cfg
,
xml
,
settings
,
param
;
...
...
@@ -292,7 +292,7 @@ static xmlrpc_value *freeswitch_api(xmlrpc_env * const envP, xmlrpc_value * cons
val
=
xmlrpc_build_value
(
envP
,
"s"
,
"ERROR!"
);
}
done
:
done
:
/* xmlrpc-c requires us to free memory it malloced from xmlrpc_decompose_value */
switch_safe_free
(
command
);
switch_safe_free
(
arg
);
...
...
@@ -347,7 +347,7 @@ static xmlrpc_value *freeswitch_man(xmlrpc_env * const envP, xmlrpc_value * cons
/* Return our result. */
val
=
xmlrpc_build_value
(
envP
,
"s"
,
buf
);
done
:
done
:
/* xmlrpc-c requires us to free memory it malloced from xmlrpc_decompose_value */
switch_safe_free
(
oid
);
switch_safe_free
(
s_action
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论