Re: Setting fdset for select without snmp_select_info

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)-&...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-06-2007
ozora@libero.it
 
Posts: n/a
Default Re: Setting fdset for select without snmp_select_info


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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:17 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0