[AGENT++] RE: RE: Persistence
Frank Fock
fock at agentpp.com
Wed Mar 16 21:46:15 CET 2005
Hi Marc,
Yes, the code would be OK, however it would not guarantee
that your configuration is saved each time a SET operation has
been processed unless your agent does not use multi-threading.
Best regards,
Frank
Marc Leclerc wrote:
>Hi,
>
>I would like to know if something like the following code would cause
>problem and if knowing the operation would work in this context, I have
>followed the get_type() to find the possible values but are unsure how it
>works.
>
>
> while (!g_fShutDown)
> {
> req = reqList->receive(-1);
>
> OutputDebugString(TEXT("SNMP Loop...\n"));
>
> if (req)
> {
> OutputDebugString(TEXT("SNMP Request...\n"));
> mib->process_request(req);
>
>
>
>>>>>here or before the call could I set a flag as to a SET operation was
>>>>>
>>>>>
>performed
>
>
> }
> else if ((reqList->size() == 0) && (mib->get_thread_pool()->is_idle()))
> {
> mib->cleanup();
>
>
>
>>>Can I call save_all() if the flag is set
>>>
>>>
> }
> }
>
>
>mib->save_all();
>
>
>Thanks
>
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/agentpp
>
>
>
More information about the AGENTPP
mailing list