access violation while sending requests with net-snmp 5.5

"Sebastian Fabig" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello,

net-snmp 5.5 seems to crash my application with an access violation, after the following lines:

snmp_session sess;
snmp_sess_init(&sess);
//fill parameters of sess, e.g. peername,community, callback, //callback_magic, retries, timeout, version = snmp version 2c
if(!snmp_session* s = snmp_open(&sess))
{ //error and return
}

//create an request

if(!snmp_send(s, request))
{// do some error handling and return
}

int m_fds = 0;
int block = 0;
struct timeval timeout;
FD_ZERO(&m_fdset);

if(snmp_select_info(&m_fds, &(m_fdset), &timeout, &block) > 0)
{
//snmp_read(m_fdset) or errorhandling
}

Those codelines are executed in a loop so that one request is send and the answer is received, before the next request is send out.

snmp_select_info is crashing after a while and it looks that after 71 calls the Sessions-variable in the snmp_sess_select_info2 points to a list with 130 sessions. net-snmp tells me than, that I should use snmp_select_info2 instead of snmp_select_info and if snmp_select_info is called the next time, it crashes with an access violation because the stack seems to be corrupt.

Is there any known bug in 5.5, with 5.4.1 it does not crash?

Thanks Sebastian
-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.