mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Change way we look for xend errors (Kazuki Mizushima )
This commit is contained in:
parent
51d5609843
commit
3f9380fdbb
@ -1,3 +1,9 @@
|
|||||||
|
Thu Mar 01 18;22:23 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
* src/xend_internal.c: Instead of looking for string 'Cannot'
|
||||||
|
in POST response, look for 'xend.err' which is likely to catch
|
||||||
|
many more error replies from XenD. Signed-off-by: Kazuki Mizushima
|
||||||
|
|
||||||
Thu Mar 01 16:17:48 EST 2007 Mark McLoughlin <markmc@redhat.com>
|
Thu Mar 01 16:17:48 EST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||||
|
|
||||||
* acinclude.m4: add LIBVIRT_COMPILE_WARNINGS, copied from
|
* acinclude.m4: add LIBVIRT_COMPILE_WARNINGS, copied from
|
||||||
|
@ -511,10 +511,10 @@ xend_post(virConnectPtr xend, const char *path, const char *ops,
|
|||||||
} else if ((ret == 202) && (strstr(content, "failed") != NULL)) {
|
} else if ((ret == 202) && (strstr(content, "failed") != NULL)) {
|
||||||
virXendError(xend, VIR_ERR_POST_FAILED, content);
|
virXendError(xend, VIR_ERR_POST_FAILED, content);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else if ((ret == 202) && (strstr(content, "Cannot") != NULL)) {
|
} else if (((ret >= 200) && (ret <= 202)) && (strstr(content, "xend.err") != NULL)) {
|
||||||
/* This is to catch case of 'virsh dump Domain-0 foo'
|
/* This is to catch case of things like 'virsh dump Domain-0 foo'
|
||||||
* which returns a success code, but the word 'Cannot'
|
* which returns a success code, but the word 'xend.err'
|
||||||
* in body to indicate error
|
* in body to indicate error :-(
|
||||||
*/
|
*/
|
||||||
virXendError(xend, VIR_ERR_POST_FAILED, content);
|
virXendError(xend, VIR_ERR_POST_FAILED, content);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user