[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-bugs
Subject:    [ net-snmp-Bugs-895643 ] Wrong send return test in _sess_synch_response
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2004-02-28 0:14:55
Message-ID: E1Aws87-0005ls-00 () sc8-sf-web2 ! sourceforge ! net
[Download RAW message or body]

Bugs item #895643, was opened at 2004-02-12 06:25
Message generated for change (Settings changed) made by slif
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=895643&group_id=12694

Category: library
Group: None
Status: Open
Resolution: None
Priority: 1
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Nobody/Anonymous (nobody)
Summary: Wrong send return test in _sess_synch_response

Initial Comment:
Hello,

First of all, thanks for the huge work!
I really appreciate it.....

This said ;), please see below the little bit of code from 
snmp_client.c.
Actually, the "if ((state->reqid = snmp_sess_send(sessp, 
pdu)) == 0)" is testing the result of the affectation 
instead of the result of the function call.
As a consequence, my IPV6 call fails with "NO-REPLY" 
while the initial pdu as never been sent.
Hope this helps,
Thanks again,

Sarah 


int
snmp_sess_synch_response(void *sessp,
                         netsnmp_pdu *pdu, netsnmp_pdu 
**response)
{
    netsnmp_session *ss;
    struct synch_state lstate, *state;
    snmp_callback   cbsav;
    void           *cbmagsav;
    int             numfds, count;
    fd_set          fdset;
    struct timeval  timeout, *tvp;
    int             block;

    ss = snmp_sess_session(sessp);
    memset((void *) &lstate, 0, sizeof(lstate));
    state = &lstate;
    cbsav = ss->callback;
    cbmagsav = ss->callback_magic;
    ss->callback = snmp_synch_input;
    ss->callback_magic = (void *) state;

    if ((state->reqid = snmp_sess_send(sessp, pdu)) == 
0) {
        snmp_free_pdu(pdu);
        state->status = STAT_ERROR;
    } else
        state->waiting = 1;


----------------------------------------------------------------------

Comment By: Michael J. Slifcak (slif)
Date: 2004-02-14 09:07

Message:
Logged In: YES 
user_id=88697

Hi, Sarah.  And warm regards.

 Which compiler ? operating system ?
and snmp library version ? are you using ?

can you enable packet print debugging to
assure that your client is transmitting the PDU ?
something like this code should turn on packet dump:

   netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
        NETSNMP_DS_LIB_DUMP_PACKET, 1);


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=895643&group_id=12694


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic