summaryrefslogtreecommitdiff
path: root/pysnmp/entity/rfc3413
diff options
context:
space:
mode:
authorelie <elie>2009-07-31 19:58:53 +0000
committerelie <elie>2009-07-31 19:58:53 +0000
commit09e4ee4b016b54a3d3a480bced0be34197d1f56c (patch)
tree1a6a87fb6db17242e73619e56f3186aef815fbba /pysnmp/entity/rfc3413
parentac02c7feb412ace26f284e617c03893dc7258f0d (diff)
downloadpysnmp-git-09e4ee4b016b54a3d3a480bced0be34197d1f56c.tar.gz
refactor NotificationOriginator to allow receiption method
customization
Diffstat (limited to 'pysnmp/entity/rfc3413')
-rw-r--r--pysnmp/entity/rfc3413/ntforg.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/pysnmp/entity/rfc3413/ntforg.py b/pysnmp/entity/rfc3413/ntforg.py
index 606a07ea..66606e07 100644
--- a/pysnmp/entity/rfc3413/ntforg.py
+++ b/pysnmp/entity/rfc3413/ntforg.py
@@ -55,9 +55,11 @@ class NotificationOriginator:
if statusInformation:
if origRetries == origRetryCount:
- cbFun(origSendRequestHandle,
- statusInformation['errorIndication'],
- cbCtx)
+ self._handleResponse(
+ origSendRequestHandle,
+ statusInformation['errorIndication'],
+ cbFun,
+ cbCtx)
return
# 3.3.6a
@@ -99,7 +101,15 @@ class NotificationOriginator:
return
# 3.3.6c
- cbFun(origSendRequestHandle, None, cbCtx)
+ self._handleResponse(origSendRequestHandle, None, cbFun, cbCtx)
+
+ def _handleResponse(
+ self,
+ sendRequestHandle,
+ errorIndication,
+ cbFun,
+ cbCtx):
+ cbFun(sendRequestHandle, errorIndication, cbCtx)
def sendNotification(
self,
@@ -257,6 +267,8 @@ class NotificationOriginator:
snmpEngine.transportDispatcher.jobStarted(id(self))
+ return sendPduHandle
+
# XXX
# move/group/implement config setting/retrieval at a stand-alone module