[jboss-cvs] JBossAS SVN: r110459 - branches/snmp4j-int/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 26 15:51:35 EST 2011
Author: thauser at redhat.com
Date: 2011-01-26 15:51:35 -0500 (Wed, 26 Jan 2011)
New Revision: 110459
Modified:
branches/snmp4j-int/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/RequestHandlerImpl.java
Log:
modify the makeErrorPdu method to allow specifying with which error code we are generating the pdu.
Modified: branches/snmp4j-int/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/RequestHandlerImpl.java
===================================================================
--- branches/snmp4j-int/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/RequestHandlerImpl.java 2011-01-26 19:46:30 UTC (rev 110458)
+++ branches/snmp4j-int/varia/src/main/java/org/jboss/jmx/adaptor/snmp/agent/RequestHandlerImpl.java 2011-01-26 20:51:35 UTC (rev 110459)
@@ -213,7 +213,7 @@
if (it.size() == 0){ // we were given an empty list in the PDU
log.debug("snmpReceivedGetBulk: No VariableBindings in received PDU");
- makeErrorPdu(response, pdu, counter);
+ makeErrorPdu(response, pdu, counter, PDU.genErr);
return response;
}
@@ -243,7 +243,7 @@
}
catch (VariableTypeException e){
log.debug("snmpReceivedGetBulk: Couldn't convert a Variable to a correct type.");
- makeErrorPdu(response, pdu, counter);
+ makeErrorPdu(response, pdu, counter, PDU.genErr);
return response;
}
response.add(new VariableBinding(noid,var));
@@ -275,7 +275,7 @@
var = Null.noSuchObject;
}
catch (VariableTypeException e) {
- makeErrorPdu(response, pdu, counter);
+ makeErrorPdu(response, pdu, counter, PDU.genErr);
var = Null.noSuchInstance;
}
@@ -373,7 +373,7 @@
}
catch (VariableTypeException e) {
log.debug("snmpReceivedGet: GETNEXT operation could not convert the returned value for " + noid + " into an appropriate type.");
- makeErrorPdu(response, pdu, counter);
+ makeErrorPdu(response, pdu, counter, PDU.genErr);
return response;
}
@@ -393,7 +393,7 @@
}
catch (VariableTypeException e) {
log.debug("snmpReceivedGet: GET operation could not convert the returned value for " + oid + " into an appropriate type.");
- makeErrorPdu(response, pdu, counter);
+ makeErrorPdu(response, pdu, counter, PDU.genErr);
return response;
@@ -478,13 +478,13 @@
if (checkObject(oid)){
var = setValueFor(oid,newVal);
}
- else
+ else{
log.debug("snmpReceivedSet: no object for setting");
undoSets(modified);
makeErrorPdu(response, pdu, counter, PDU.noAccess);
return response;
-
}
+ }
catch (NoSuchInstanceException e){
log.debug("snmpReceivedSet: attempt to set a non-existent OID " + oid);
undoSets(modified);
More information about the jboss-cvs-commits
mailing list