1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-10-27 00:57:47 +08:00

bump version number, additional test for #198

This commit is contained in:
Joel Bender
2018-06-13 09:29:34 -04:00
parent a3c9f1eb46
commit 6b74cad1eb
6 changed files with 39 additions and 27 deletions

View File

@@ -18,7 +18,7 @@ if _sys.platform not in _supported_platforms:
# Project Metadata
#
__version__ = '0.17.2'
__version__ = '0.17.3'
__author__ = 'Joel Bender'
__email__ = 'joel@carrickbender.com'

View File

@@ -776,7 +776,7 @@ class NetworkServiceElement(ApplicationServiceElement):
self.response(adapter, iamrtn)
else:
if _debug: NetworkServiceElement._debug(" - forwarding request to other adapters")
if _debug: NetworkServiceElement._debug(" - forwarding to other adapters")
# build a request
whoisrtn = WhoIsRouterToNetwork(dnet, user_data=npdu.pduUserData)
@@ -806,19 +806,21 @@ class NetworkServiceElement(ApplicationServiceElement):
sap.add_router_references(adapter.adapterNet, npdu.pduSource, npdu.iartnNetworkList)
# skip if this is not a router
if len(sap.adapters) > 1:
if len(sap.adapters) == 1:
if _debug: NetworkServiceElement._debug(" - not a router")
else:
if _debug: NetworkServiceElement._debug(" - forwarding to other adapters")
# build a broadcast annoucement
iamrtn = IAmRouterToNetwork(npdu.iartnNetworkList, user_data=npdu.pduUserData)
iamrtn.pduDestination = LocalBroadcast()
# send it to all of the connected adapters
for xadapter in sap.adapters.values():
# skip the horse it rode in on
if (xadapter is adapter):
continue
# request this
self.request(xadapter, iamrtn)
if xadapter is not adapter:
if _debug: NetworkServiceElement._debug(" - sending on adapter: %r", xadapter)
self.request(xadapter, iamrtn)
# look for pending NPDUs for the networks
for dnet in npdu.iartnNetworkList: