By default AGENT++ is a multi-threaded agent. Therefore access to each MibEntry in the a Mib has to be synchronized.
...
Code Block |
---|
Mib mib; ... mib->lock_mib(); // code to lookup a MibEntry (replace "my context" with "" or your context and the OID by the table entry OID, for example): MibTable* table = (MibTable*) mib->get("my context", "1.3.6.1.4.1.????.1"); // enter protected region: table->start_synch(); // now you can drop the Mib lock mib->unlock_mib(); // do the real work on table ... table->end_synch(); |
...