When failing to marshall an XDR message, include the
full program/version/status/proc/type info, to allow
easier debugging & diagnosis of the problem.
* src/remote/remote_driver.c: Improve error when marshalling
fails
---
src/remote/remote_driver.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index bed6a15..118be3a 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -10166,7 +10166,9 @@ prepareCall(struct private_data *priv,
}
if (!(*args_filter) (&xdr, args)) {
- remoteError(VIR_ERR_RPC, "%s", _("marshalling args"));
+ remoteError(VIR_ERR_RPC,
+ _("Unable to marshall arguments for program %d version %d
procedure %d type %d status %d"),
+ hdr.prog, hdr.vers, hdr.proc, hdr.type, hdr.status);
goto error;
}
@@ -10622,7 +10624,9 @@ processCallDispatchReply(virConnectPtr conn ATTRIBUTE_UNUSED,
switch (hdr->status) {
case REMOTE_OK:
if (!(*thecall->ret_filter) (xdr, thecall->ret)) {
- remoteError(VIR_ERR_RPC, "%s", _("unmarshalling ret"));
+ remoteError(VIR_ERR_RPC,
+ _("Unable to marshall reply for program %d version %d
procedure %d type %d status %d"),
+ hdr->prog, hdr->vers, hdr->proc, hdr->type,
hdr->status);
return -1;
}
thecall->mode = REMOTE_MODE_COMPLETE;
@@ -10631,7 +10635,9 @@ processCallDispatchReply(virConnectPtr conn ATTRIBUTE_UNUSED,
case REMOTE_ERROR:
memset (&thecall->err, 0, sizeof thecall->err);
if (!xdr_remote_error (xdr, &thecall->err)) {
- remoteError(VIR_ERR_RPC, "%s", _("unmarshalling
remote_error"));
+ remoteError(VIR_ERR_RPC,
+ _("Unable to marshall error for program %d version %d
procedure %d type %d status %d"),
+ hdr->prog, hdr->vers, hdr->proc, hdr->type,
hdr->status);
return -1;
}
thecall->mode = REMOTE_MODE_ERROR;
--
1.7.4.4