Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
6eb59c71
提交
6eb59c71
authored
4月 03, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add variable expansion to mod_xml_ldap
上级
3f685a25
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
12 行增加
和
3 行删除
+12
-3
mod_xml_ldap.c
src/mod/xml_int/mod_xml_ldap/mod_xml_ldap.c
+12
-3
没有找到文件。
src/mod/xml_int/mod_xml_ldap/mod_xml_ldap.c
浏览文件 @
6eb59c71
...
...
@@ -116,7 +116,7 @@ SWITCH_MODULE_DEFINITION(mod_xml_ldap, mod_xml_ldap_load, mod_xml_ldap_shutdown,
static
switch_xml_t
xml_ldap_search
(
const
char
*
section
,
const
char
*
tag_name
,
const
char
*
key_name
,
const
char
*
key_value
,
switch_event_t
*
params
,
void
*
user_data
);
static
switch_status_t
trydir
(
switch_xml_t
*
,
int
*
,
LDAP
*
,
char
*
,
char
*
,
xml_binding_t
*
);
static
switch_status_t
trydir
(
switch_xml_t
*
,
int
*
,
LDAP
*
,
char
*
,
char
*
,
xml_binding_t
*
,
switch_event_t
*
params
);
static
switch_status_t
do_config
(
void
);
static
switch_status_t
trysearch
(
switch_xml_t
*
pxml
,
int
*
xoff
,
LDAP
*
ld
,
char
*
basedn
,
char
*
filter
);
void
rec
(
switch_xml_t
*
,
int
*
,
LDAP
*
ld
,
char
*
);
...
...
@@ -353,7 +353,7 @@ static switch_status_t do_config(void)
}
static
switch_status_t
trydir
(
switch_xml_t
*
pxml
,
int
*
xoff
,
LDAP
*
ld
,
char
*
dir_domain
,
char
*
dir_exten
,
xml_binding_t
*
binding
)
static
switch_status_t
trydir
(
switch_xml_t
*
pxml
,
int
*
xoff
,
LDAP
*
ld
,
char
*
dir_domain
,
char
*
dir_exten
,
xml_binding_t
*
binding
,
switch_event_t
*
param_event
)
{
switch_status_t
ret
=
SWITCH_STATUS_FALSE
;
int
off
=
*
xoff
;
...
...
@@ -373,6 +373,15 @@ static switch_status_t trydir(switch_xml_t *pxml, int *xoff, LDAP * ld, char *di
basedn
=
switch_mprintf
(
binding
->
basedn
,
dir_domain
);
filter
=
switch_mprintf
(
binding
->
filter
,
dir_exten
);
if
(
param_event
)
{
char
*
expanded
=
switch_event_expand_headers
(
param_event
,
filter
);
if
(
expanded
!=
filter
)
{
free
(
filter
);
filter
=
expanded
;
}
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_NOTICE
,
"searching in basedn %s with filter %s
\n
"
,
basedn
,
filter
);
if
((
ldap_search_s
(
ld
,
basedn
,
LDAP_SCOPE_SUB
,
filter
,
NULL
,
0
,
&
msg
)
!=
LDAP_SUCCESS
))
...
...
@@ -612,7 +621,7 @@ static switch_xml_t xml_ldap_search(const char *section, const char *tag_name, c
break
;
case
XML_LDAP_DIRECTORY
:
ret
=
trydir
(
&
xml
,
&
xoff
,
ld
,
dir_domain
,
dir_exten
,
binding
);
ret
=
trydir
(
&
xml
,
&
xoff
,
ld
,
dir_domain
,
dir_exten
,
binding
,
params
);
break
;
case
XML_LDAP_DIALPLAN
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论