Fix IPP request op handling; add Destination attr fetch convenience API#9
Fix IPP request op handling; add Destination attr fetch convenience API#9Abd002 wants to merge 2 commits intoOpenPrinting:mainfrom
Conversation
|
Hey, little out of sync with this pr, can you explain to me what you are trying to achieve !, I might be completely off track with this ! |
|
The goal is basically to make two things work reliably:
If you want, I can split it into two PRs (one for the ipp.rs fix, one for the get_attrs helper). The ipp.rs one is definitely required. |
|
Okay can yu add an example of how previously it was failing and how the new archi fixed that, like working one and give some sc |
I faced this exact same issue today, @Abd002 your solution seemed to have fixed it, I tested it on my local. Waiting for this to get merged. cc: @Gmin2 |
16b7836 to
1c4ca08
Compare
|
@Gmin2 I’ve updated this PR and added tests to make the change easier to review and to show the intended behavior more clearly. |


This PR includes two related changes:
Fix IPP request copying in
src/ipp.rsIppRequest::send()previously copied requests usingippNew()which does not preserve the operation code. This causedcupsDoRequest()to receive an invalid/empty request for custom operations in some cases.Now we grab the op via
ippGetOperation()and copy usingippNewRequest(op), ensuring the request sent to CUPS has a valid operation code.Convenience API for fetching printer attributes
Adds
AttrKind/AttrSpecandDestination::get_attrs()to request missing printer attributes and automatically populatedest.options. This avoids forcing callers to hand-roll IPP requests just to fetch a couple of fields.Why