RE: how to Initialise the contents of the table?Just give me a example

"Mike Ayers" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <83E753BE7B6A324ABB336245BAF1DAAC0D8864A0@mailserver.metatv-ds.metatv.com>
> From: 飞飞 [mailto:[email protected]]
> Sent: Friday, December 04, 2009 1:44 AM

> I think I am going to die......
> 
> Just give me a example,so I can imitate  it done my job...pls

	We're not trying to cause pain, but we don't really understand your deployment.  One way to do it is by adding:

[SNIP]
/*  change 1 to portId of a valid disk  */
diskSystemTable_createEntry(1);
[/SNIP]

	Note that there seems to be a bug in your createEntry routine:

[SNIP]
    entry->portID = portID;
    entry->next = diskSystemTable_head;
    diskSystemTable_head = entry;
    return entry;
[/SNIP]

	...should be...

[SNIP]
    struct diskSystemTable_entry *ptr;

    ptr = diskSystemTable_head;
    while (NULL != ptr->next)
        {
        ptr = ptr->next;
        }

    entry->portID = portID;
    entry->next = NULL;
    ptr->next = entry;

    return entry;
[/SNIP]

	...if that's a linked list you're building, as opposed to a one-entry queue..?


	HTH,

Mike

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.