I already tried that. If I try to access the socket with transport->sock or
similar (like snmp_sess_transport(ss)->sock) the application behaves in a very
strange way. Basically every line containig transport->sock and all the
following code is ignored (as if a return call was placed in their place).
In this case:
unsigned int prova;
prova = (unsigned int) &transport->sock;
fds = prova +1;
//until this point the application behaves normally
FD_SET(transport->sock, &fdset);//this line and all the following code is
ignored as if a return call was placed here
fds = select(fds, &fdset, 0, 0, &timeout);
I've never seen a beahvior of that kind and I don't have a clue about what's
causing it.
---------- Initial Header -----------
>From : [EMAIL PROTECTED]
To : [email protected]
Cc :
Date : Wed, 5 Sep 2007 12:53:01 +0200 (CEST)
Subject : Re: Setting fdset for select without snmp_select_info
> On Wed, September 5, 2007 11:36 am, [EMAIL PROTECTED] wrote:
>
> > prova = (unsigned int) &transport->sock;
>
> You're taking the address of the socket, not the value, then casting it to
> a uint. select wants the socket itself, not an address. Try dropping the
> &.
>
> Pete
>
>
>
------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-modeĀ di Wind
http://i-mode.wind.it/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders