astitcher commented on pull request #362: URL: https://github.com/apache/qpid-proton/pull/362#issuecomment-1067058621
The save and restore state is needed here because (at least some of) the pn_data_t values used here come from the user and are not internal to the proton implementation. And the user left the pn_data_t in one state and we can't leave it silently in another. Note that this is true even if the pn_data_t is say an array of symbols representing a capability list - The current proton API just gives the user the pn_data_t to modify and the user the user modifies this pn_data_t but at no point 'gives it back' to proton. This is a really crappy API, but there we are. The user can assume that it can just keep on modifying this pn_data_t, so we do have to maintain the cursor state. The area of where pn_data_t is exposed for this kind of thing is on my near term list of things to fix! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org