Hi All,

I am writing a async snmp application taking help from netsnmp async code
example.
I am following the same steps that are mentioned in example.
In my application I am polling the agent at regular interval. On timer
elapse the code creates a snmp_session with all values and sends the get
request to agent.
The error part that I am facing is

while (active_hosts) {
    int fds = 0, block = 1;
    fd_set fdset;
    struct timeval timeout;

    FD_ZERO(&fdset);
    snmp_select_info(&fds, &fdset, &timeout, &block);
    fds = select(fds, &fdset, NULL, NULL, block ? NULL : &timeout);
    if (fds < 0) {
        perror("select failed");
        exit(1);
    }
    if (fds)
        snmp_read(&fdset);
    else
        snmp_timeout();
  }

here, after snmp_select_info, when block variable becomes 0 the code
works fine but when it becomes 1 it never go after select. Iam polling
an agent and agent is also sending data but since code dosen't go
beyond select statement the application doesn't show the values that
are arriving. I have checked on wireshark qgent is sending the value
on get request.


Please help me in possible solution.


Thanks & Regards

geet
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to