ssorj commented on a change in pull request #636: DISPATCH-1496: Reset link variables after the drain is complete. Also… URL: https://github.com/apache/qpid-dispatch/pull/636#discussion_r353703141
########## File path: include/qpid/dispatch/router_core.h ########## @@ -674,6 +674,15 @@ int qdr_link_process_deliveries(qdr_core_t *core, qdr_link_t *link, int credit); void qdr_link_flow(qdr_core_t *core, qdr_link_t *link, int credit, bool drain_mode); +/** + * The passed in link has been drained, it is no longer in drain mode. Sets the link's drain flag to false and sets credit to core to zero. + * Call this right after calling pn_link_drained + * + * @param core - router core + * @param link - the link that has been drained + */ +void qdr_link_drained(qdr_core_t *core, qdr_link_t *link); Review comment: I know this is the naming Proton has, but it's confusing. 'qdr_link_drained' looks like a predicate. Something like 'qdr_link_mark_drained' or '_set_drained' would be a lot clearer IMO. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
