Fix relaying of op-attrs to error reporting
This commit is contained in:
parent
0fe2ff2eed
commit
ca2b9086d8
1 changed files with 5 additions and 5 deletions
|
@ -121,11 +121,6 @@ void IppPrinter::getPrinterAttributesFinished(QNetworkReply *reply)
|
||||||
IppMsg resp(reply);
|
IppMsg resp(reply);
|
||||||
qDebug() << resp.getStatus() << resp.getOpAttrs() << resp.getPrinterAttrs();
|
qDebug() << resp.getStatus() << resp.getOpAttrs() << resp.getPrinterAttrs();
|
||||||
_attrs = 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)
|
catch(std::exception e)
|
||||||
{
|
{
|
||||||
|
@ -170,6 +165,11 @@ void IppPrinter::printRequestFinished(QNetworkReply *reply)
|
||||||
IppMsg resp(reply);
|
IppMsg resp(reply);
|
||||||
qDebug() << resp.getStatus() << resp.getOpAttrs() << resp.getJobAttrs();
|
qDebug() << resp.getStatus() << resp.getOpAttrs() << resp.getJobAttrs();
|
||||||
_jobAttrs = resp.getJobAttrs()[0].toObject();
|
_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;
|
status = resp.getStatus() <= 0xff;
|
||||||
}
|
}
|
||||||
catch(std::exception e)
|
catch(std::exception e)
|
||||||
|
|
Loading…
Reference in a new issue