Re: RE: [AGENT++] Problem when run agentx++win32master process

qinyd at tom.com qinyd at tom.com
Fri Jul 23 10:33:45 CEST 2004


Dave,

It's OK. Thanks for the explanation.

The problem is,as Dave said,when called SnmpExtensionInit function to init the DLL(D:\WINNT\system32\inetsrv\ftpmib.dll),
the pointer to an event handle the extension agent passes back  is not valid or NULL
(MSDN said:If the extension agent does not generate traps, the phSubagentTrapEvent parameter should return a value of NULL) ,
but seem return nothing.

Daniel

> Daniel,

> 

> I would guess that one (or more) of the SnmpExtension DLL agents that

> agentx++win32master loaded did not return a valid handle when a call was made

> to its SnmpExtensionInit function (through the variable initFunction).  I

> think that the code in ExtensionDLL::init needs to initialize the value of

> the local variable eventHandle to zero in case the called routine does not

> set the value eventHandle to anything.  I also suggest checking the value

> after the call to the SnmpExtensionInit function to insure that the value is

> not INVALID_HANDLE_VALUE.  If it is, then it should zero the local

> eventHandle variable.  The code in TrapPoller::run is already set up to not

> add any event handles that are zero.

> 

> For example, try the following:

> 

> HANDLE eventHandle = 0;

> AsnObjectIdentifier asnOid;

> BOOL status = initFunction(0, &eventHandle, &asnOid);

> if (eventHandle == INVALID_HANDLE_VALUE)

>     eventHandle = 0;

> 

> 

> I hope this helps.

> 

> Regards,

> Dave

> 

> 

> -----Original Message-----

> From: qinyd at tom.com [mailto:qinyd at tom.com] 

> Sent: Thursday, July 22, 2004 5:48 PM

> To: agentpp at agentpp.org

> Subject: [AGENT++] Problem when run agentx++win32master process

> 

> Hi Frank and all list members:

>   I'm using the agentx++win32master.

> Once it run, the error msg below display on the stdout continuously.

> 

> 20040722.16:33:11: 1884: (2)ERROR  : Wait for traps failed (reason): (6)

> 

> 

> I consider the problem occured in the function TrapPoller::run().

> when execute the sentence below, the return value is very large.

> 

> DWORD status = WaitForMultipleObjects(n+1, eventHandles, FALSE, 10000);

> 

> 

> It seems that there is any problem with the TrapPoller.

> 

> Any suggestions would be greatly appreciated.

> Daniel

> 

> 

> 
===============================================
诺基亚铃声 http://sms.tom.com/index2.php?inc=3&type=24
摩托罗拉铃声 http://sms.tom.com/index2.php?inc=3&type=26
西门子铃声 http://sms.tom.com/index2.php?inc=3&type=25

诺基亚小图 http://sms.tom.com/index2.php?inc=2
诺基亚大图 http://sms.tom.com/index2.php?inc=2&type=3740
西门子图片 http://sms.tom.com/index2.php?inc=2&type=30

手机点歌 http://sms.tom.com/index2.php?inc=song
===============================================


More information about the AGENTPP mailing list