Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
af6b23a1
提交
af6b23a1
authored
12月 22, 2014
作者:
Jeff Lenk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7046 fix some additional warnings
上级
85ff3ae3
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
10 行增加
和
7 行删除
+10
-7
mcast_cpp.cpp
src/mod/endpoints/mod_verto/mcast/mcast_cpp.cpp
+1
-1
mcast_cpp.h
src/mod/endpoints/mod_verto/mcast/mcast_cpp.h
+1
-1
mod_verto.c
src/mod/endpoints/mod_verto/mod_verto.c
+6
-4
ws.c
src/mod/endpoints/mod_verto/ws.c
+2
-1
没有找到文件。
src/mod/endpoints/mod_verto/mcast/mcast_cpp.cpp
浏览文件 @
af6b23a1
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include <poll.h>
#include <poll.h>
#endif
#endif
McastHandle
::
McastHandle
(
const
char
*
host
,
int
port
,
int
flags
)
McastHandle
::
McastHandle
(
const
char
*
host
,
int
16_t
port
,
int
flags
)
{
{
mcast_socket_create
(
host
,
port
,
&
handle
,
(
mcast_flag_t
)
flags
);
mcast_socket_create
(
host
,
port
,
&
handle
,
(
mcast_flag_t
)
flags
);
}
}
...
...
src/mod/endpoints/mod_verto/mcast/mcast_cpp.h
浏览文件 @
af6b23a1
...
@@ -45,7 +45,7 @@ class McastHandle {
...
@@ -45,7 +45,7 @@ class McastHandle {
private
:
private
:
mcast_handle_t
handle
;
mcast_handle_t
handle
;
public
:
public
:
McastHandle
(
const
char
*
host
,
int
port
,
int
flags
);
McastHandle
(
const
char
*
host
,
int
16_t
port
,
int
flags
);
virtual
~
McastHandle
();
virtual
~
McastHandle
();
int
send
(
const
char
*
data
);
int
send
(
const
char
*
data
);
char
*
recv
(
int
ms
=
0
);
char
*
recv
(
int
ms
=
0
);
...
...
src/mod/endpoints/mod_verto/mod_verto.c
浏览文件 @
af6b23a1
...
@@ -104,7 +104,7 @@ static void json_cleanup(void)
...
@@ -104,7 +104,7 @@ static void json_cleanup(void)
switch_mutex_lock
(
json_GLOBALS
.
store_mutex
);
switch_mutex_lock
(
json_GLOBALS
.
store_mutex
);
top:
top:
for
(
hi
=
switch_core_hash_first_iter
(
json_GLOBALS
.
store_hash
,
hi
);
hi
;
hi
=
switch_core_hash_next
(
&
hi
)
)
{
for
(
hi
=
switch_core_hash_first_iter
(
json_GLOBALS
.
store_hash
,
hi
);
hi
;)
{
switch_core_hash_this
(
hi
,
&
var
,
NULL
,
&
val
);
switch_core_hash_this
(
hi
,
&
var
,
NULL
,
&
val
);
json
=
(
cJSON
*
)
val
;
json
=
(
cJSON
*
)
val
;
cJSON_Delete
(
json
);
cJSON_Delete
(
json
);
...
@@ -315,7 +315,7 @@ static void unsub_all_jsock(void)
...
@@ -315,7 +315,7 @@ static void unsub_all_jsock(void)
top:
top:
head
=
NULL
;
head
=
NULL
;
for
(
hi
=
switch_core_hash_first
(
globals
.
event_channel_hash
);
hi
;
hi
=
switch_core_hash_next
(
&
hi
)
)
{
for
(
hi
=
switch_core_hash_first
(
globals
.
event_channel_hash
);
hi
;)
{
switch_core_hash_this
(
hi
,
NULL
,
NULL
,
&
val
);
switch_core_hash_this
(
hi
,
NULL
,
NULL
,
&
val
);
head
=
(
jsock_sub_node_head_t
*
)
val
;
head
=
(
jsock_sub_node_head_t
*
)
val
;
jsock_unsub_head
(
NULL
,
head
);
jsock_unsub_head
(
NULL
,
head
);
...
@@ -3976,6 +3976,8 @@ static void parse_ip(char *host, uint16_t *port, in_addr_t *addr, char *input)
...
@@ -3976,6 +3976,8 @@ static void parse_ip(char *host, uint16_t *port, in_addr_t *addr, char *input)
strncpy
(
host
,
input
,
255
);
strncpy
(
host
,
input
,
255
);
host
[
255
]
=
0
;
if
((
p
=
strchr
(
host
,
':'
))
!=
NULL
)
{
if
((
p
=
strchr
(
host
,
':'
))
!=
NULL
)
{
*
p
++
=
'\0'
;
*
p
++
=
'\0'
;
*
port
=
(
uint16_t
)
atoi
(
p
);
*
port
=
(
uint16_t
)
atoi
(
p
);
...
@@ -4983,7 +4985,7 @@ static switch_bool_t json_commit(cJSON *json, const char *name, switch_mutex_t *
...
@@ -4983,7 +4985,7 @@ static switch_bool_t json_commit(cJSON *json, const char *name, switch_mutex_t *
sql
=
switch_mprintf
(
"insert into json_store (name,data) values('%q','%q')"
,
name
,
ascii
);
sql
=
switch_mprintf
(
"insert into json_store (name,data) values('%q','%q')"
,
name
,
ascii
);
switch_snprintf
(
del_sql
,
sizeof
(
del_sql
),
"delete from json_store where name='%q'"
,
name
);
switch_snprintf
v
(
del_sql
,
sizeof
(
del_sql
),
"delete from json_store where name='%q'"
,
name
);
dbh
=
json_get_db_handle
();
dbh
=
json_get_db_handle
();
...
@@ -5038,7 +5040,7 @@ static switch_status_t json_hanguphook(switch_core_session_t *session)
...
@@ -5038,7 +5040,7 @@ static switch_status_t json_hanguphook(switch_core_session_t *session)
SWITCH_STANDARD_JSON_API
(
json_store_function
)
SWITCH_STANDARD_JSON_API
(
json_store_function
)
{
{
cJSON
*
JSON_STORE
,
*
reply
=
NULL
,
*
data
=
cJSON_GetObjectItem
(
json
,
"data"
);
cJSON
*
JSON_STORE
=
NULL
,
*
reply
=
NULL
,
*
data
=
cJSON_GetObjectItem
(
json
,
"data"
);
switch_status_t
status
=
SWITCH_STATUS_FALSE
;
switch_status_t
status
=
SWITCH_STATUS_FALSE
;
const
char
*
cmd_attr
=
cJSON_GetObjectCstr
(
data
,
"cmd"
);
const
char
*
cmd_attr
=
cJSON_GetObjectCstr
(
data
,
"cmd"
);
const
char
*
uuid
=
cJSON_GetObjectCstr
(
data
,
"uuid"
);
const
char
*
uuid
=
cJSON_GetObjectCstr
(
data
,
"uuid"
);
...
...
src/mod/endpoints/mod_verto/ws.c
浏览文件 @
af6b23a1
...
@@ -309,7 +309,7 @@ int ws_handshake(wsh_t *wsh)
...
@@ -309,7 +309,7 @@ int ws_handshake(wsh_t *wsh)
"%s
\r\n
"
,
"%s
\r\n
"
,
b64
,
b64
,
proto_buf
);
proto_buf
);
respond
[
511
]
=
0
;
ws_raw_write
(
wsh
,
respond
,
strlen
(
respond
));
ws_raw_write
(
wsh
,
respond
,
strlen
(
respond
));
wsh
->
handshake
=
1
;
wsh
->
handshake
=
1
;
...
@@ -322,6 +322,7 @@ int ws_handshake(wsh_t *wsh)
...
@@ -322,6 +322,7 @@ int ws_handshake(wsh_t *wsh)
snprintf
(
respond
,
sizeof
(
respond
),
"HTTP/1.1 400 Bad Request
\r\n
"
snprintf
(
respond
,
sizeof
(
respond
),
"HTTP/1.1 400 Bad Request
\r\n
"
"Sec-WebSocket-Version: 13
\r\n\r\n
"
);
"Sec-WebSocket-Version: 13
\r\n\r\n
"
);
respond
[
511
]
=
0
;
ws_raw_write
(
wsh
,
respond
,
strlen
(
respond
));
ws_raw_write
(
wsh
,
respond
,
strlen
(
respond
));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论