Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9fc65c87
提交
9fc65c87
authored
8月 18, 2017
作者:
Shane Bryldt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-10167: Fixed up linux build for latest work on channel and protocol removal at runtime
上级
a81b57bd
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
19 行增加
和
19 行删除
+19
-19
blade_subscriptionmgr.c
libs/libblade/src/blade_subscriptionmgr.c
+13
-13
testcon.c
libs/libblade/test/testcon.c
+2
-2
ks_pool.h
libs/libks/src/include/ks_pool.h
+3
-3
ks_pool.c
libs/libks/src/ks_pool.c
+1
-1
没有找到文件。
libs/libblade/src/blade_subscriptionmgr.c
浏览文件 @
9fc65c87
/*
/*
* Copyright (c) 2017, Shane Bryldt
* Copyright (c) 2017, Shane Bryldt
* All rights reserved.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* modification, are permitted provided that the following conditions
* are met:
* are met:
*
*
* * Redistributions of source code must retain the above copyright
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* notice, this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* documentation and/or other materials provided with the distribution.
*
*
* * Neither the name of the original author; nor the names of any contributors
* * Neither the name of the original author; nor the names of any contributors
* may be used to endorse or promote products derived from this software
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* without specific prior written permission.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...
@@ -64,7 +64,7 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_create(blade_subscriptionmgr_t **b
...
@@ -64,7 +64,7 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_create(blade_subscriptionmgr_t **b
blade_subscriptionmgr_t
*
bsmgr
=
NULL
;
blade_subscriptionmgr_t
*
bsmgr
=
NULL
;
ks_assert
(
bsmgrP
);
ks_assert
(
bsmgrP
);
ks_pool_open
(
&
pool
);
ks_pool_open
(
&
pool
);
ks_assert
(
pool
);
ks_assert
(
pool
);
...
@@ -221,7 +221,7 @@ KS_DECLARE(ks_bool_t) blade_subscriptionmgr_subscriber_add(blade_subscriptionmgr
...
@@ -221,7 +221,7 @@ KS_DECLARE(ks_bool_t) blade_subscriptionmgr_subscriber_add(blade_subscriptionmgr
blade_subscription_create
(
&
bsub
,
pool
,
protocol
,
realm
,
channel
);
blade_subscription_create
(
&
bsub
,
pool
,
protocol
,
realm
,
channel
);
ks_assert
(
bsub
);
ks_assert
(
bsub
);
ks_hash_insert
(
bsmgr
->
subscriptions
,
(
void
*
)
ks_pstrdup
(
pool
,
key
),
bsub
);
ks_hash_insert
(
bsmgr
->
subscriptions
,
(
void
*
)
ks_pstrdup
(
pool
,
key
),
(
void
*
)
bsub
);
propagate
=
KS_TRUE
;
propagate
=
KS_TRUE
;
}
}
...
@@ -391,13 +391,13 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
...
@@ -391,13 +391,13 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
bs
=
blade_routemgr_route_lookup
(
blade_handle_routemgr_get
(
bsmgr
->
handle
),
(
const
char
*
)
key
);
bs
=
blade_routemgr_route_lookup
(
blade_handle_routemgr_get
(
bsmgr
->
handle
),
(
const
char
*
)
key
);
if
(
bs
)
{
if
(
bs
)
{
if
(
!
routers
)
ks_hash_create
(
&
routers
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
if
(
!
routers
)
ks_hash_create
(
&
routers
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
if
(
!
ks_hash_search
(
routers
,
blade_session_id_get
(
bs
),
KS_UNLOCKED
))
ks_hash_insert
(
routers
,
blade_session_id_get
(
bs
),
bs
);
if
(
!
ks_hash_search
(
routers
,
(
void
*
)
blade_session_id_get
(
bs
),
KS_UNLOCKED
))
ks_hash_insert
(
routers
,
(
void
*
)
blade_session_id_get
(
bs
),
(
void
*
)
bs
);
else
blade_session_read_unlock
(
bs
);
else
blade_session_read_unlock
(
bs
);
}
}
}
}
if
(
command
==
BLADE_RPCBROADCAST_COMMAND_CHANNEL_REMOVE
)
{
if
(
command
==
BLADE_RPCBROADCAST_COMMAND_CHANNEL_REMOVE
)
{
if
(
!
channels
)
ks_hash_create
(
&
channels
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
if
(
!
channels
)
ks_hash_create
(
&
channels
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
ks_hash_insert
(
channels
,
channel
,
(
void
*
)
KS_TRUE
);
ks_hash_insert
(
channels
,
(
void
*
)
channel
,
(
void
*
)
KS_TRUE
);
}
}
}
}
...
@@ -435,13 +435,13 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
...
@@ -435,13 +435,13 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
bs
=
blade_routemgr_route_lookup
(
blade_handle_routemgr_get
(
bsmgr
->
handle
),
(
const
char
*
)
key2
);
bs
=
blade_routemgr_route_lookup
(
blade_handle_routemgr_get
(
bsmgr
->
handle
),
(
const
char
*
)
key2
);
if
(
bs
)
{
if
(
bs
)
{
if
(
!
routers
)
ks_hash_create
(
&
routers
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
if
(
!
routers
)
ks_hash_create
(
&
routers
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
if
(
!
ks_hash_search
(
routers
,
blade_session_id_get
(
bs
),
KS_UNLOCKED
))
ks_hash_insert
(
routers
,
blade_session_id_get
(
bs
),
bs
);
if
(
!
ks_hash_search
(
routers
,
(
void
*
)
blade_session_id_get
(
bs
),
KS_UNLOCKED
))
ks_hash_insert
(
routers
,
(
void
*
)
blade_session_id_get
(
bs
),
(
void
*
)
bs
);
else
blade_session_read_unlock
(
bs
);
else
blade_session_read_unlock
(
bs
);
}
}
}
}
if
(
!
channels
)
ks_hash_create
(
&
channels
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
if
(
!
channels
)
ks_hash_create
(
&
channels
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
ks_hash_insert
(
channels
,
blade_subscription_channel_get
(
bsub
),
(
void
*
)
KS_TRUE
);
ks_hash_insert
(
channels
,
(
void
*
)
blade_subscription_channel_get
(
bsub
),
(
void
*
)
KS_TRUE
);
}
}
}
}
...
@@ -455,7 +455,7 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
...
@@ -455,7 +455,7 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
if
(
bs
)
{
if
(
bs
)
{
if
(
!
excluded_nodeid
||
ks_safe_strcasecmp
(
blade_session_id_get
(
bs
),
excluded_nodeid
))
{
if
(
!
excluded_nodeid
||
ks_safe_strcasecmp
(
blade_session_id_get
(
bs
),
excluded_nodeid
))
{
if
(
!
routers
)
ks_hash_create
(
&
routers
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
if
(
!
routers
)
ks_hash_create
(
&
routers
,
KS_HASH_MODE_CASE_INSENSITIVE
,
KS_HASH_FLAG_NOLOCK
|
KS_HASH_FLAG_DUP_CHECK
,
pool
);
ks_hash_insert
(
routers
,
blade_session_id_get
(
bs
),
bs
);
ks_hash_insert
(
routers
,
(
void
*
)
blade_session_id_get
(
bs
),
(
void
*
)
bs
);
}
}
else
blade_session_read_unlock
(
bs
);
else
blade_session_read_unlock
(
bs
);
}
}
...
...
libs/libblade/test/testcon.c
浏览文件 @
9fc65c87
...
@@ -169,7 +169,7 @@ ks_bool_t test_join_request_handler(blade_rpc_request_t *brpcreq, void *data)
...
@@ -169,7 +169,7 @@ ks_bool_t test_join_request_handler(blade_rpc_request_t *brpcreq, void *data)
void
*
key
=
NULL
;
void
*
key
=
NULL
;
void
*
value
=
NULL
;
void
*
value
=
NULL
;
ks_hash_this
(
it
,
&
key
,
NULL
,
&
value
);
ks_hash_this
(
it
,
(
const
void
**
)
&
key
,
NULL
,
&
value
);
cJSON_AddItemToArray
(
channels
,
cJSON_CreateString
((
const
char
*
)
key
));
cJSON_AddItemToArray
(
channels
,
cJSON_CreateString
((
const
char
*
)
key
));
}
}
...
@@ -239,7 +239,7 @@ ks_bool_t test_leave_request_handler(blade_rpc_request_t *brpcreq, void *data)
...
@@ -239,7 +239,7 @@ ks_bool_t test_leave_request_handler(blade_rpc_request_t *brpcreq, void *data)
void
*
key
=
NULL
;
void
*
key
=
NULL
;
void
*
value
=
NULL
;
void
*
value
=
NULL
;
ks_hash_this
(
it
,
&
key
,
NULL
,
&
value
);
ks_hash_this
(
it
,
(
const
void
**
)
&
key
,
NULL
,
&
value
);
cJSON_AddItemToArray
(
channels
,
cJSON_CreateString
((
const
char
*
)
key
));
cJSON_AddItemToArray
(
channels
,
cJSON_CreateString
((
const
char
*
)
key
));
}
}
...
...
libs/libks/src/include/ks_pool.h
浏览文件 @
9fc65c87
...
@@ -151,7 +151,7 @@ KS_DECLARE(ks_status_t) ks_pool_clear(ks_pool_t *pool);
...
@@ -151,7 +151,7 @@ KS_DECLARE(ks_status_t) ks_pool_clear(ks_pool_t *pool);
KS_DECLARE
(
ks_bool_t
)
ks_pool_verify
(
void
*
addr
);
KS_DECLARE
(
ks_bool_t
)
ks_pool_verify
(
void
*
addr
);
// @todo fill in documentation
// @todo fill in documentation
inline
KS_DECLARE
(
ks_pool_t
*
)
ks_pool_get
(
void
*
addr
);
KS_DECLARE
(
ks_pool_t
*
)
ks_pool_get
(
void
*
addr
);
/*
/*
* void *ks_pool_alloc
* void *ks_pool_alloc
...
@@ -303,7 +303,7 @@ KS_DECLARE(void *) ks_pool_ref_ex(void *addr, ks_status_t *error_p);
...
@@ -303,7 +303,7 @@ KS_DECLARE(void *) ks_pool_ref_ex(void *addr, ks_status_t *error_p);
*
*
* DESCRIPTION:
* DESCRIPTION:
*
*
* Reallocate an address in a memory pool to a new size.
* Reallocate an address in a memory pool to a new size.
*
*
* RETURNS:
* RETURNS:
*
*
...
@@ -325,7 +325,7 @@ KS_DECLARE(void *) ks_pool_resize(void *old_addr, const ks_size_t new_size);
...
@@ -325,7 +325,7 @@ KS_DECLARE(void *) ks_pool_resize(void *old_addr, const ks_size_t new_size);
*
*
* DESCRIPTION:
* DESCRIPTION:
*
*
* Reallocate an address in a memory pool to a new size.
* Reallocate an address in a memory pool to a new size.
*
*
* RETURNS:
* RETURNS:
*
*
...
...
libs/libks/src/ks_pool.c
浏览文件 @
9fc65c87
...
@@ -602,7 +602,7 @@ KS_DECLARE(ks_bool_t) ks_pool_verify(void *addr)
...
@@ -602,7 +602,7 @@ KS_DECLARE(ks_bool_t) ks_pool_verify(void *addr)
}
}
// @todo fill in documentation
// @todo fill in documentation
inline
KS_DECLARE
(
ks_pool_t
*
)
ks_pool_get
(
void
*
addr
)
KS_DECLARE
(
ks_pool_t
*
)
ks_pool_get
(
void
*
addr
)
{
{
ks_assert
(
addr
);
ks_assert
(
addr
);
#ifdef DEBUG
#ifdef DEBUG
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论