Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
dbb447fb
提交
dbb447fb
authored
9月 07, 2016
作者:
Mike Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-9457: fix code after decl error
上级
4503dee9
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
9 行增加
和
5 行删除
+9
-5
azure.c
src/mod/applications/mod_http_cache/azure.c
+9
-5
没有找到文件。
src/mod/applications/mod_http_cache/azure.c
浏览文件 @
dbb447fb
...
@@ -213,7 +213,8 @@ static size_t curl_memory_read_callback(void *ptr, size_t size, size_t nmemb, vo
...
@@ -213,7 +213,8 @@ static size_t curl_memory_read_callback(void *ptr, size_t size, size_t nmemb, vo
* @param num the number to encode
* @param num the number to encode
* @result the base64 string (must be freed)
* @result the base64 string (must be freed)
*/
*/
static
char
*
azure_blob_block_num_to_id
(
const
unsigned
int
num
)
{
static
char
*
azure_blob_block_num_to_id
(
const
unsigned
int
num
)
{
char
num_str
[
BLOCK_STR_LENGTH
],
num_len
;
char
num_str
[
BLOCK_STR_LENGTH
],
num_len
;
char
*
out_str
;
char
*
out_str
;
...
@@ -370,18 +371,20 @@ switch_curl_slist_t *azure_blob_append_headers(http_profile_t *profile, switch_c
...
@@ -370,18 +371,20 @@ switch_curl_slist_t *azure_blob_append_headers(http_profile_t *profile, switch_c
* @param bytes_per_block returned value of bytes_per_block in the configuration
* @param bytes_per_block returned value of bytes_per_block in the configuration
* @return SWITCH_STATUS_SUCCESS on success
* @return SWITCH_STATUS_SUCCESS on success
*/
*/
switch_status_t
azure_blob_config_profile
(
switch_xml_t
xml
,
http_profile_t
*
profile
)
{
switch_status_t
azure_blob_config_profile
(
switch_xml_t
xml
,
http_profile_t
*
profile
)
{
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
char
*
key
=
NULL
;
char
*
key
=
NULL
;
switch_xml_t
base_domain_xml
=
switch_xml_child
(
xml
,
"base-domain"
);
profile
->
append_headers_ptr
=
azure_blob_append_headers
;
profile
->
append_headers_ptr
=
azure_blob_append_headers
;
profile
->
finalise_put_ptr
=
azure_blob_finalise_put
;
profile
->
finalise_put_ptr
=
azure_blob_finalise_put
;
switch_xml_t
base_domain_xml
=
switch_xml_child
(
xml
,
"base-domain"
);
/* check if environment variables set the keys */
/* check if environment variables set the keys */
key
=
getenv
(
"AZURE_STORAGE_ACCESS_KEY"
);
key
=
getenv
(
"AZURE_STORAGE_ACCESS_KEY"
);
if
(
!
zstr
(
key
))
{
if
(
!
zstr
(
key
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Using AZURE_STORAGE_ACCESS_KEY environment variables for Azure access on profile
\"
%s
\"\n
"
,
profile
->
name
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Using AZURE_STORAGE_ACCESS_KEY environment variables for Azure access on profile
\"
%s
\"\n
"
,
profile
->
name
);
key
=
switch_safe_strdup
(
key
);
key
=
switch_safe_strdup
(
key
);
}
else
{
}
else
{
/* use configuration for keys */
/* use configuration for keys */
...
@@ -413,6 +416,7 @@ switch_status_t azure_blob_config_profile(switch_xml_t xml, http_profile_t *prof
...
@@ -413,6 +416,7 @@ switch_status_t azure_blob_config_profile(switch_xml_t xml, http_profile_t *prof
switch_safe_free
(
profile
->
base_domain
);
switch_safe_free
(
profile
->
base_domain
);
}
}
}
}
return
status
;
return
status
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论