From 67ca3d48a2f4987581f702936039579e53983cf6 Mon Sep 17 00:00:00 2001 From: Joel Bender Date: Fri, 29 Jan 2016 02:10:05 -0500 Subject: [PATCH] when the application sends a confirmed service downstream without an invoke ID, give it the one assigned by the lower layers of the stack --- py27/bacpypes/appservice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/py27/bacpypes/appservice.py b/py27/bacpypes/appservice.py index 41224aa..12faf28 100755 --- a/py27/bacpypes/appservice.py +++ b/py27/bacpypes/appservice.py @@ -1314,6 +1314,12 @@ class ApplicationServiceAccessPoint(ApplicationServiceElement, ServiceAccessPoin # forward the encoded packet self.request(xpdu) + # if the upper layers of the application did not assign an invoke ID, + # copy the one that was assigned on its way down the stack + if isinstance(apdu, ConfirmedRequestPDU) and apdu.apduInvokeID is None: + if _debug: ApplicationServiceAccessPoint._debug(" - pass invoke ID upstream %r", xpdu.apduInvokeID) + apdu.apduInvokeID = xpdu.apduInvokeID + def confirmation(self, apdu): if _debug: ApplicationServiceAccessPoint._debug("confirmation %r", apdu)