[AGENT++] MibTable::prepare_set_request(...) returns Cannot Create/Modify - Wrong Type

Dario maljur dmaljur at elma.hr
Tue Sep 12 16:54:20 CEST 2006


Hi.

I'm using wrapper around inherited by MibTables as storage for MibLeafs
values of some object. I overloaded MibTable::prepare_set_request()

To be execute whenever manager set's a value. After program execution has
entered prepare_set_request(.) I search for my snmpVariables 

(Witch are just class snmpVariable : public MibLeaf, but contain pointer to
actual system variable.) based on Oid of request received.

After I found the variable I call it's prepare_set_request(.) that will set
the actual variable in system through it's pointer, including itself. 

The problem is next. The variables's prepare_set_request returns OK status
to caller's prepare_set_request() (Table's) ,

but if I try to return that status in Table's prepare_set_request();

The execution chrashes. And if I use
MibTable::prepare_set_request(req,ind); after that, the return value to the
manager is 

SNMP: Cannot Create/Modify variable - Wrong Type.

I'm really confused here.




More information about the AGENTPP mailing list