Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch-contrib
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch-contrib
Commits
fce6be54
提交
fce6be54
authored
7月 30, 2010
作者:
nazim
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
urldecode values before passing them to radius
上级
3aa405a2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
19 行增加
和
4 行删除
+19
-4
Makefile.am
nazim/xmlcdrd/plugins/radcdr/Makefile.am
+2
-0
radcdr.c
nazim/xmlcdrd/plugins/radcdr/radcdr.c
+17
-4
没有找到文件。
nazim/xmlcdrd/plugins/radcdr/Makefile.am
浏览文件 @
fce6be54
...
...
@@ -12,6 +12,8 @@ all:
-I@with_radius_includes@
\
@with_radius_lib@
\
@with_glib2_flags@
\
`@with_apreq2_config@
--libs
--includes`
\
`@with_apr_config@
--libs
--includes
--cppflags`
\
-lconfig
-lglib-2.0
-lm
-lz
-lcrypt
\
../../stmtexpldr.o
../../stmtexp.o
../../log.o
...
...
nazim/xmlcdrd/plugins/radcdr/radcdr.c
浏览文件 @
fce6be54
...
...
@@ -13,7 +13,7 @@
#include <string.h>
#include <libconfig.h>
#include <glib.h>
#include <apreq2/apreq_util.h>
#define PLUGIN_NAME "rad cdr"
#define PLUGIN_DESC "Rad cdr logger"
...
...
@@ -90,6 +90,8 @@ typedef struct radcdr_local_vars
char
my_servers
[
SERVER_MAX
][
XCDR_PLUGIN_STRMAXLEN
];
char
cf
[
XCDR_PLUGIN_STRMAXLEN
];
// = "mod_radius_cdr.conf";
GString
*
decoded
;
RADVSAS
*
vsas
;
int
vsas_count
;
...
...
@@ -412,7 +414,9 @@ int plugin_init (const char* filename, const char *options, XCDR_PLUGSTATE *stat
return
PLUG_STATUS_ERROR
;
}
vars
->
decoded
=
g_string_sized_new
(
XCDR_PLUGIN_STRMAXLEN
*
2
);
plugin_config
(
options
);
fprintf
(
stderr
,
"%s plugin_init (%s)
\n
"
,
PLUGIN_NAME
,
options
);
...
...
@@ -425,7 +429,7 @@ int plugin_init (const char* filename, const char *options, XCDR_PLUGSTATE *stat
int
plugin_free
(
XCDR_PLUGSTATE
*
state
)
{
vars
=
state
->
local_vars
;
g_string_free
(
vars
->
decoded
,
TRUE
);
free
(
vars
->
vsas
);
free
(
vars
);
...
...
@@ -453,7 +457,7 @@ int plugin_main (STMTEXP_TAB *vex, XCDR_PLUGSTATE *state)
int
retval
;
char
buffer
[
32
]
=
""
;
vars
=
state
->
local_vars
;
...
...
@@ -502,6 +506,15 @@ int plugin_main (STMTEXP_TAB *vex, XCDR_PLUGSTATE *state)
if
(
NULL
!=
t
)
{
/* urldecode value */
apr_size_t
len
=
strlen
(
t
);
g_string_set_size
(
vars
->
decoded
,
len
);
apreq_decode
(
vars
->
decoded
->
str
,
&
len
,
t
,
strlen
(
t
));
t
=
vars
->
decoded
->
str
;
syslog
(
LOG_DEBUG
,
"radcdr adding rad vsa '%s': '%s' pec:%d
\n
"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论