From a4d9a7973644a72d521b462df6cad688e526d27c Mon Sep 17 00:00:00 2001 From: Jacob Poulsen Date: Mon, 17 Mar 2008 15:16:22 +0100 Subject: [PATCH] Added print of status or Error Report from xml ES --- client/client.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/client/client.c b/client/client.c index befc3e7..811d957 100644 --- a/client/client.c +++ b/client/client.c @@ -1925,16 +1925,30 @@ void process_ESResponse(Z_ExtendedServicesResponse *res) if (ext->which == Z_External_itemOrder) { Z_IOTaskPackage *otp = ext->u.itemOrder->u.taskPackage; - if (otp && otp->targetPart && otp->targetPart->itemRequest) + + if (otp && otp->targetPart ) { - Z_External *ext = otp->targetPart->itemRequest; - if (ext->which == Z_External_octet) + if (otp->targetPart->itemRequest) { - Odr_oct *doc = ext->u.octet_aligned; - printf("Got itemRequest doc %.*s\n", - doc->len, doc->buf); + Z_External *ext = otp->targetPart->itemRequest; + if (ext->which == Z_External_octet) + { + Odr_oct *doc = ext->u.octet_aligned; + printf("Got itemRequest doc %.*s\n", + doc->len, doc->buf); + } } - } + else if (otp->targetPart->statusOrErrorReport) + { + Z_External *ext = otp->targetPart->statusOrErrorReport; + if (ext->which == Z_External_octet) + { + Odr_oct *doc = ext->u.octet_aligned; + printf("Got Status or Error Report doc %.*s\n", + doc->len, doc->buf); + } + } + } } } if (res->taskPackage && res->taskPackage->which == Z_External_octet) -- 1.7.10.4