Mixing sync and async calls?

This is a discussion on Mixing sync and async calls? within the SNMP Coders forums, part of the Networking and Network Related category; Greetings, I'm writing a program that, in essence, polls a number of devices simultaneously. They're slow to respond ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-14-2007
7715@blargh.com
 
Posts: n/a
Default Mixing sync and async calls?

Greetings,

I'm writing a program that, in essence, polls a number of devices
simultaneously. They're slow to respond individually, and I have a lot to
go through - doing them sequentially would take forever. I set up a
callback function and send my requests off via snmp_send(), use snmp_wait()
and everything is happy.

However, in one case, while processing the async response in my callback
function, I need to fetch a different piece of information before I can
finish with processing. I make an entire new SNMP session, and send it off
to snmp_synch_response.

Unfortuantely, snmp_synch_response never returns - it looks like it sends
the request off and uses snmp_wait(), but that unfortuantely just goes back
to processing the async responses. This eventually just blows over the
stack (hitting bt in gdb and getting 500+ stack frames is not a pleasant
experience).

Right now, I'm looking at having to just call the command-line snmpget to do
what I want (it would be rather difficult to get this fed back into the
async processing) - is that the only solution to this? Is there a way to
get NET-SNMP to ignore the async requests while its supposed to be
processing the single sync request?

Any help is appreciated, thanks.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
_______________________________________________
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 10:10 PM.


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