This is an automated email from the ASF dual-hosted git repository.
jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/main by this push:
new e403774 DISPATCH-2269 Remove PROTON-2184 session context workaround
needed for Proton < 0.31 (#1410)
e403774 is described below
commit e403774acd658a1e64c00009334182551d297617
Author: Jiri Daněk <[email protected]>
AuthorDate: Mon Nov 1 15:15:30 2021 +0100
DISPATCH-2269 Remove PROTON-2184 session context workaround needed for
Proton < 0.31 (#1410)
---
include/qpid/dispatch/container.h | 11 -----------
src/container.c | 8 --------
2 files changed, 19 deletions(-)
diff --git a/include/qpid/dispatch/container.h
b/include/qpid/dispatch/container.h
index 5d186ff..f2eadc0 100644
--- a/include/qpid/dispatch/container.h
+++ b/include/qpid/dispatch/container.h
@@ -246,21 +246,10 @@ qd_link_list_t *qd_session_q3_blocked_links(qd_session_t
*qd_ssn);
void qd_connection_log_policy_denial(qd_link_t *link, const char *text);
-// handy macros to get around PROTON-2184: pn_session_set_context aborts if
-// context==0 (can remove this once qdrouter requires >= proton 0.31.x)
-#if ((PN_VERSION_MAJOR == 0) && (PN_VERSON_MINOR <= 30))
-#define QD_NULL_SESSION_CONTEXT ((qd_session_t *)1)
-static inline qd_session_t *qd_session_from_pn(pn_session_t *pn_ssn)
-{
- qd_session_t *qd_ssn = (qd_session_t *)pn_session_get_context(pn_ssn);
- return (qd_ssn == QD_NULL_SESSION_CONTEXT) ? 0 : qd_ssn;
-}
-#else
static inline qd_session_t *qd_session_from_pn(pn_session_t *pn_ssn)
{
return (qd_session_t *)pn_session_get_context(pn_ssn);
}
-#endif
///@}
#endif
diff --git a/src/container.c b/src/container.c
index af82c36..1a9cb23 100644
--- a/src/container.c
+++ b/src/container.c
@@ -90,19 +90,11 @@ static inline void qd_session_link_pn(qd_session_t *qd_ssn,
pn_session_t *pn_ssn
pn_session_set_context(pn_ssn, qd_ssn);
}
-#ifdef QD_NULL_SESSION_CONTEXT
-static inline void qd_session_unlink_pn(qd_session_t *qd_ssn, pn_session_t
*pn_ssn)
-{
- assert(qd_ssn);
- pn_session_set_context(pn_ssn, QD_NULL_SESSION_CONTEXT);
-}
-#else
static inline void qd_session_unlink_pn(qd_session_t *qd_ssn, pn_session_t
*pn_ssn)
{
assert(qd_ssn);
pn_session_set_context(pn_ssn, 0);
}
-#endif
ALLOC_DECLARE(qd_session_t);
ALLOC_DEFINE(qd_session_t);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]