diff options
author | elie <elie> | 2013-09-29 21:19:23 +0000 |
---|---|---|
committer | elie <elie> | 2013-09-29 21:19:23 +0000 |
commit | b410a2ca1de301a22458eb7479f1f465739b4952 (patch) | |
tree | 6be6673beb24ad113bde20553b8f94ca67eccad2 /pysnmp | |
parent | 146fece069396b6b3405d6b2c3e6b2a9e7b6d697 (diff) | |
download | pysnmp-git-b410a2ca1de301a22458eb7479f1f465739b4952.tar.gz |
fix to pass stateReference to registered app on unconfirmed notifications
reception (to let NotificationReceiver Apps browsing request details).
Diffstat (limited to 'pysnmp')
-rw-r--r-- | pysnmp/proto/mpmod/rfc2576.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pysnmp/proto/mpmod/rfc2576.py b/pysnmp/proto/mpmod/rfc2576.py index 5b6f6ceb..d988496c 100644 --- a/pysnmp/proto/mpmod/rfc2576.py +++ b/pysnmp/proto/mpmod/rfc2576.py @@ -308,9 +308,6 @@ class SnmpV1MessageProcessingModel(AbstractMessageProcessingModel): else: sendPduHandle = None - # state is only saved for incoming confirmed-type requests - stateReference = None - # no error by default statusInformation = None @@ -330,6 +327,8 @@ class SnmpV1MessageProcessingModel(AbstractMessageProcessingModel): errorIndication = errind.dataMismatch ) + stateReference = None + # rfc3412: 7.2.12c smHandler.releaseStateInformation(securityStateReference) @@ -398,8 +397,12 @@ class SnmpV1MessageProcessingModel(AbstractMessageProcessingModel): # rfc3412: 7.2.14 if pduType in rfc3411.unconfirmedClassPDUs: + # Pass new stateReference to let app browse request details + stateReference = self._cache.newStateReference() + # This is not specified explicitly in RFC smHandler.releaseStateInformation(securityStateReference) + return ( messageProcessingModel, securityModel, securityName, |