Skip to content

Commit

Permalink
release 0.16.7 ready to go
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBender committed Feb 17, 2018
2 parents d8703a4 + cac4233 commit e6c5a80
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 36 deletions.
24 changes: 12 additions & 12 deletions py25/bacpypes/bvllservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,6 @@ def __init__(self, addr=None, ttl=None, sapID=None, cid=None, sid=None):
def indication(self, pdu):
if _debug: BIPForeign._debug("indication %r", pdu)

# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
return

# check for local stations
if pdu.pduDestination.addrType == Address.localStationAddr:
# make an original unicast PDU
Expand All @@ -510,6 +505,11 @@ def indication(self, pdu):

# check for broadcasts
elif pdu.pduDestination.addrType == Address.localBroadcastAddr:
# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
return

# make an original broadcast PDU
xpdu = DistributeBroadcastToNetwork(pdu, user_data=pdu.pduUserData)
xpdu.pduDestination = self.bbmdAddress
Expand Down Expand Up @@ -546,6 +546,13 @@ def confirmation(self, pdu):

return

elif isinstance(pdu, OriginalUnicastNPDU):
# build a vanilla PDU
xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData)

# send it upstream
self.response(xpdu)

# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
Expand All @@ -559,13 +566,6 @@ def confirmation(self, pdu):
# send this to the service access point
self.sap_response(pdu)

elif isinstance(pdu, OriginalUnicastNPDU):
# build a vanilla PDU
xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData)

# send it upstream
self.response(xpdu)

elif isinstance(pdu, ForwardedNPDU):
# build a PDU with the source from the real source
xpdu = PDU(pdu.pduData, source=pdu.bvlciAddress, destination=LocalBroadcast(), user_data=pdu.pduUserData)
Expand Down
25 changes: 13 additions & 12 deletions py27/bacpypes/bvllservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,6 @@ def __init__(self, addr=None, ttl=None, sapID=None, cid=None, sid=None):
def indication(self, pdu):
if _debug: BIPForeign._debug("indication %r", pdu)

# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
return

# check for local stations
if pdu.pduDestination.addrType == Address.localStationAddr:
# make an original unicast PDU
Expand All @@ -506,6 +501,11 @@ def indication(self, pdu):

# check for broadcasts
elif pdu.pduDestination.addrType == Address.localBroadcastAddr:
# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
return

# make an original broadcast PDU
xpdu = DistributeBroadcastToNetwork(pdu, user_data=pdu.pduUserData)
xpdu.pduDestination = self.bbmdAddress
Expand Down Expand Up @@ -542,6 +542,14 @@ def confirmation(self, pdu):

return

elif isinstance(pdu, OriginalUnicastNPDU):
# build a vanilla PDU
xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData)

# send it upstream
self.response(xpdu)
return

# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
Expand All @@ -555,13 +563,6 @@ def confirmation(self, pdu):
# send this to the service access point
self.sap_response(pdu)

elif isinstance(pdu, OriginalUnicastNPDU):
# build a vanilla PDU
xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData)

# send it upstream
self.response(xpdu)

elif isinstance(pdu, ForwardedNPDU):
# build a PDU with the source from the real source
xpdu = PDU(pdu.pduData, source=pdu.bvlciAddress, destination=LocalBroadcast(), user_data=pdu.pduUserData)
Expand Down
24 changes: 12 additions & 12 deletions py34/bacpypes/bvllservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,6 @@ def __init__(self, addr=None, ttl=None, sapID=None, cid=None, sid=None):
def indication(self, pdu):
if _debug: BIPForeign._debug("indication %r", pdu)

# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
return

# check for local stations
if pdu.pduDestination.addrType == Address.localStationAddr:
# make an original unicast PDU
Expand All @@ -505,6 +500,11 @@ def indication(self, pdu):

# check for broadcasts
elif pdu.pduDestination.addrType == Address.localBroadcastAddr:
# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
return

# make an original broadcast PDU
xpdu = DistributeBroadcastToNetwork(pdu, user_data=pdu.pduUserData)
xpdu.pduDestination = self.bbmdAddress
Expand Down Expand Up @@ -541,6 +541,13 @@ def confirmation(self, pdu):

return

elif isinstance(pdu, OriginalUnicastNPDU):
# build a vanilla PDU
xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData)

# send it upstream
self.response(xpdu)

# check the BBMD registration status, we may not be registered
if self.registrationStatus != 0:
if _debug: BIPForeign._debug(" - packet dropped, unregistered")
Expand All @@ -554,13 +561,6 @@ def confirmation(self, pdu):
# send this to the service access point
self.sap_response(pdu)

elif isinstance(pdu, OriginalUnicastNPDU):
# build a vanilla PDU
xpdu = PDU(pdu.pduData, source=pdu.pduSource, destination=pdu.pduDestination, user_data=pdu.pduUserData)

# send it upstream
self.response(xpdu)

elif isinstance(pdu, ForwardedNPDU):
# build a PDU with the source from the real source
xpdu = PDU(pdu.pduData, source=pdu.bvlciAddress, destination=LocalBroadcast(), user_data=pdu.pduUserData)
Expand Down

0 comments on commit e6c5a80

Please sign in to comment.