Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
ef088ed9
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ef088ed9
编写于
1月 26, 2010
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
esx: Output error details from libcurl
上级
594ac31b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
6 deletion
+9
-6
src/esx/esx_vi.c
src/esx/esx_vi.c
+8
-6
src/esx/esx_vi.h
src/esx/esx_vi.h
+1
-0
未找到文件。
src/esx/esx_vi.c
浏览文件 @
ef088ed9
...
@@ -251,8 +251,8 @@ esxVI_CURL_Perform(esxVI_Context *ctx, const char *url)
...
@@ -251,8 +251,8 @@ esxVI_CURL_Perform(esxVI_Context *ctx, const char *url)
if
(
errorCode
!=
CURLE_OK
)
{
if
(
errorCode
!=
CURLE_OK
)
{
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
"curl_easy_perform() returned an error: %s (%d)"
,
"curl_easy_perform() returned an error: %s (%d)
: %s
"
,
curl_easy_strerror
(
errorCode
),
errorCode
);
curl_easy_strerror
(
errorCode
),
errorCode
,
ctx
->
curl_error
);
return
-
1
;
return
-
1
;
}
}
...
@@ -262,8 +262,8 @@ esxVI_CURL_Perform(esxVI_Context *ctx, const char *url)
...
@@ -262,8 +262,8 @@ esxVI_CURL_Perform(esxVI_Context *ctx, const char *url)
if
(
errorCode
!=
CURLE_OK
)
{
if
(
errorCode
!=
CURLE_OK
)
{
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
"curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned an "
"curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned an "
"error: %s (%d)"
,
curl_easy_strerror
(
errorCode
),
"error: %s (%d)
: %s
"
,
curl_easy_strerror
(
errorCode
),
errorCode
);
errorCode
,
ctx
->
curl_error
);
return
-
1
;
return
-
1
;
}
}
...
@@ -282,8 +282,8 @@ esxVI_CURL_Perform(esxVI_Context *ctx, const char *url)
...
@@ -282,8 +282,8 @@ esxVI_CURL_Perform(esxVI_Context *ctx, const char *url)
if
(
errorCode
!=
CURLE_OK
)
{
if
(
errorCode
!=
CURLE_OK
)
{
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
"curl_easy_getinfo(CURLINFO_REDIRECT_URL) returned "
"curl_easy_getinfo(CURLINFO_REDIRECT_URL) returned "
"an error: %s (%d)"
,
curl_easy_strerror
(
errorCode
),
"an error: %s (%d)
: %s
"
,
curl_easy_strerror
(
errorCode
),
errorCode
);
errorCode
,
ctx
->
curl_error
);
}
else
{
}
else
{
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
"The server redirects from '%s' to '%s'"
,
url
,
"The server redirects from '%s' to '%s'"
,
url
,
...
@@ -360,6 +360,8 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
...
@@ -360,6 +360,8 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
esxVI_CURL_ReadString
);
esxVI_CURL_ReadString
);
curl_easy_setopt
(
ctx
->
curl_handle
,
CURLOPT_WRITEFUNCTION
,
curl_easy_setopt
(
ctx
->
curl_handle
,
CURLOPT_WRITEFUNCTION
,
esxVI_CURL_WriteBuffer
);
esxVI_CURL_WriteBuffer
);
curl_easy_setopt
(
ctx
->
curl_handle
,
CURLOPT_ERRORBUFFER
,
ctx
->
curl_error
);
#if ESX_VI__CURL__ENABLE_DEBUG_OUTPUT
#if ESX_VI__CURL__ENABLE_DEBUG_OUTPUT
curl_easy_setopt
(
ctx
->
curl_handle
,
CURLOPT_DEBUGFUNCTION
,
esxVI_CURL_Debug
);
curl_easy_setopt
(
ctx
->
curl_handle
,
CURLOPT_DEBUGFUNCTION
,
esxVI_CURL_Debug
);
curl_easy_setopt
(
ctx
->
curl_handle
,
CURLOPT_VERBOSE
,
1
);
curl_easy_setopt
(
ctx
->
curl_handle
,
CURLOPT_VERBOSE
,
1
);
...
...
src/esx/esx_vi.h
浏览文件 @
ef088ed9
...
@@ -77,6 +77,7 @@ struct _esxVI_Context {
...
@@ -77,6 +77,7 @@ struct _esxVI_Context {
char
*
ipAddress
;
char
*
ipAddress
;
CURL
*
curl_handle
;
CURL
*
curl_handle
;
struct
curl_slist
*
curl_headers
;
struct
curl_slist
*
curl_headers
;
char
curl_error
[
CURL_ERROR_SIZE
];
virMutex
curl_lock
;
virMutex
curl_lock
;
char
*
username
;
char
*
username
;
char
*
password
;
char
*
password
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录