IppMsg: Don't encode job attributes if there are none
This commit is contained in:
parent
ad14386b53
commit
f717529883
1 changed files with 7 additions and 5 deletions
|
@ -199,12 +199,14 @@ QByteArray IppMsg::encode(Operation op)
|
||||||
}
|
}
|
||||||
for(QJsonArray::iterator ait = _jobAttrs.begin(); ait != _jobAttrs.end(); ait++)
|
for(QJsonArray::iterator ait = _jobAttrs.begin(); ait != _jobAttrs.end(); ait++)
|
||||||
{
|
{
|
||||||
ipp << quint8(2);
|
|
||||||
QJsonObject tmpObj = ait->toObject();
|
QJsonObject tmpObj = ait->toObject();
|
||||||
for(QJsonObject::iterator it = tmpObj.begin(); it != tmpObj.end(); it++)
|
if (!tmpObj.isEmpty()) {
|
||||||
{
|
ipp << quint8(2);
|
||||||
QJsonObject val = it.value().toObject();
|
for(QJsonObject::iterator it = tmpObj.begin(); it != tmpObj.end(); it++)
|
||||||
ipp << encode_attr(val["tag"].toInt(), it.key(), val["value"]);
|
{
|
||||||
|
QJsonObject val = it.value().toObject();
|
||||||
|
ipp << encode_attr(val["tag"].toInt(), it.key(), val["value"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue