[Git][NTPsec/ntpsec][master] Added notification retransmission.
Ian Bruene
gitlab at mg.gitlab.com
Wed Feb 21 01:58:17 UTC 2018
Ian Bruene pushed to branch master at NTPsec / ntpsec
Commits:
a74aeac3 by Ian Bruene at 2018-02-20T19:57:34-06:00
Added notification retransmission.
- - - - -
1 changed file:
- pylib/agentx.py
Changes:
=====================================
pylib/agentx.py
=====================================
--- a/pylib/agentx.py
+++ b/pylib/agentx.py
@@ -177,7 +177,6 @@ class PacketControl:
0, ax.REPERR_NOT_OPEN, 0)
self.sendPacket(resp, False)
continue
- # TODO: Need to check for expected responses
ptype = packet.pduType
if ptype in self.pduHandlers:
self.pduHandlers[ptype](packet)
@@ -295,7 +294,10 @@ class PacketControl:
tid = self.highestTransactionID + 5 # +5 to avoid collisions
self.highestTransactionID = tid
pkt = ax.NotifyPDU(True, self.sessionID, tid, 1, varbinds, context)
- self.sendPacket(pkt, True) # TODO: callback
+ def resendNotify(pkt, orig):
+ if pkt is None:
+ self.sendPacket(orig, True, callback=resendNotify)
+ self.sendPacket(pkt, True, resendNotify)
def sendErrorResponse(self, errorHeader, errorType, errorIndex):
err = ax.ResponsePDU(errorHeader["flags"]["bigEndian"],
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a74aeac32819a3cb0d7f68df261e90de1a3a883c
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a74aeac32819a3cb0d7f68df261e90de1a3a883c
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180221/570298fa/attachment.html>
More information about the vc
mailing list