<-- Ishiro has left #net-snmp
[2013/05/12 20:40:08] #net-snmp <SonicYouth> what's the difference between snmp_sess_async_send & snmp_async_send? seems all the same
[2013/05/12 20:40:28] #net-snmp <SonicYouth> but when I use "snmp_sess_async_send" I got seg fault
[2013/05/12 20:43:01] #net-snmp <SonicYouth> and I'm confused about why I must use fd+select to get the data printed from async callback
[2013/05/12 20:47:56] #net-snmp <rstory-work> see the comment block at ./snmp_api.c:4694:
[2013/05/12 20:48:37] #net-snmp <SonicYouth> ok:) wait
[2013/05/12 21:05:26] #net-snmp <SonicYouth> read it, so seems the params is different - 1st param of snmp_sess_async_send need to be a pointer, hmm...
[2013/05/12 21:09:43] #net-snmp <SonicYouth> and, seems net-snmp's async is not as usual, I commented the fd parts, and use "while (1) printf("%d\n", active_hosts);" instead (active_hosts will be changed in callback),
[2013/05/12 21:09:43] #net-snmp <SonicYouth> but the value of "active_hosts" never changes... it's really weird
[2013/05/12 21:12:02] #net-snmp <SonicYouth> to be honest, it's just a part of my app, if there must be a loop to retrieve the data got from async callback,
[2013/05/12 21:12:03] #net-snmp <SonicYouth> then it's nearly equal to sync function since I need to do something else... :(
[2013/05/12 21:12:26] #net-snmp <SonicYouth> (I'm using ecore, which has a loop too
[2013/05/12 21:17:18] #net-snmp <rstory-work> the fd+select is needed so we can get the response, parse it and call the callback.. if you are using ecore, you need to find a way to integrate our fds so we can process incoming responses..
[2013/05/12 21:19:24] #net-snmp <rstory-work> this link might be of interest.. http://vincent.bernat.im/en/blog/2012-snmp-event-loop.html
[2013/05/12 21:21:10] #net-snmp <rstory-work> i'm calling it a night.. good luck!
[2013/05/12 21:25:54] #net-snmp <SonicYouth> rstory: thank you, I'll read it now :)
[2013/05/12 21:26:33] #net-snmp <SonicYouth> (time flies, I need to solve the problem asap