This is a discussion on Re: Setting fdset for select without snmp_select_info within the SNMP Coders forums, part of the Networking and Network Related category; I already tried that. If I try to access the socket with transport->sock or= similar (like snmp_sess_transport(ss)-&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 th= e following code is ignored (as if a return call was placed in their place). In this case: unsigned int prova; prova =3D (unsigned int) &transport->sock; fds =3D 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 =3D 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 : net-snmp-coders-bounces@lists.sourceforge.net To : net-snmp-coders@lists.sourceforge.net 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, ozora@libero.it wrote: > = > > prova =3D (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=99 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 Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |