From ca2b9086d8ac63a4b8059eec87a7e3712186086d Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Fri, 12 Jun 2020 17:02:24 +0200 Subject: [PATCH] Fix relaying of op-attrs to error reporting --- src/ippprinter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ippprinter.cpp b/src/ippprinter.cpp index e3aec7a..c5e588a 100644 --- a/src/ippprinter.cpp +++ b/src/ippprinter.cpp @@ -121,11 +121,6 @@ void IppPrinter::getPrinterAttributesFinished(QNetworkReply *reply) IppMsg resp(reply); qDebug() << resp.getStatus() << resp.getOpAttrs() << resp.getPrinterAttrs(); _attrs = resp.getPrinterAttrs(); - if(resp.getOpAttrs().keys().contains("status-message")) - { // Sometimes there are no response attributes at all, - // maybe status-message from the operation attributes is somewhat useful - _attrs["status-message"] = resp.getOpAttrs()["status-message"]; - } } catch(std::exception e) { @@ -170,6 +165,11 @@ void IppPrinter::printRequestFinished(QNetworkReply *reply) IppMsg resp(reply); qDebug() << resp.getStatus() << resp.getOpAttrs() << resp.getJobAttrs(); _jobAttrs = resp.getJobAttrs()[0].toObject(); + if(resp.getOpAttrs().keys().contains("status-message")) + { // Sometimes there are no response attributes at all, + // maybe status-message from the operation attributes is somewhat useful + _jobAttrs["status-message"] = resp.getOpAttrs()["status-message"]; + } status = resp.getStatus() <= 0xff; } catch(std::exception e)