summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelie <elie>2010-05-21 07:29:57 +0000
committerelie <elie>2010-05-21 07:29:57 +0000
commit57c0b5e49356976ec46b639c11e9672c2ebf0aa4 (patch)
tree01524272efad8d2f71c204c64210180527958d70
parent385ed1d02204271f5e803db0cf9704854fc85132 (diff)
downloadpysnmp-57c0b5e49356976ec46b639c11e9672c2ebf0aa4.tar.gz
Fix to communityName processing at _cookV1SystemInfo() -- typo rendered
passed communityName not committed into LCD.
-rw-r--r--pysnmp/entity/config.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pysnmp/entity/config.py b/pysnmp/entity/config.py
index c137736..ccee1e7 100644
--- a/pysnmp/entity/config.py
+++ b/pysnmp/entity/config.py
@@ -49,7 +49,7 @@ def addV1System(snmpEngine, securityName, communityName,
if contextEngineId is None:
contextEngineId = snmpEngineID.syntax
- if contextName is not None:
+ if contextName is None:
contextName = communityName
snmpEngine.msgAndPduDsp.mibInstrumController.writeVars(
@@ -428,7 +428,8 @@ def __cookVacmUserInfo(snmpEngine, securityModel, securityName, securityLevel):
'r' + groupName, 'w' + groupName, 'n' + groupName )
def addVacmUser(snmpEngine, securityModel, securityName, securityLevel,
- readSubTree=(), writeSubTree=(), notifySubTree=()):
+ readSubTree=(), writeSubTree=(), notifySubTree=(),
+ contextName=''):
( groupName, securityLevel,
readView, writeView, notifyView ) = __cookVacmUserInfo(
snmpEngine, securityModel, securityName, securityLevel,
@@ -437,7 +438,7 @@ def addVacmUser(snmpEngine, securityModel, securityName, securityLevel,
snmpEngine, groupName, securityModel, securityName
)
addVacmAccess(
- snmpEngine, groupName, '', securityModel, securityLevel, 1,
+ snmpEngine, groupName, contextName, securityModel, securityLevel, 1,
readView, writeView, notifyView
)
if readSubTree: