This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: SNMP re-inits when session closed or trapsink removed -- FIX
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Tad <ecos_removethispart at ds3switch dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 15 Jun 2007 14:07:41 +0200
- Subject: Re: [ECOS] SNMP re-inits when session closed or trapsink removed -- FIX
- References: <46726D19.50602@ds3switch.com>
> Here's the quick fix. Most people probably don't close trapsinks too
> often and perhaps didn't even notice snmp re-init when they did.
>
> snmpd.c : receive()
> ...
> count = select(numfds, &fdset, 0, 0, tvp);
>
> if (count > 0){
> snmp_read(&fdset);
> } else switch(count){
> case 0:
> snmp_timeout();
> break;
> case -1:
> - if (errno == EINTR){
> + if (errno == EINTR || errno == EBADF){
> continue;
> } else {
> snmp_log_perror("select");
> }
>
Hi Tod
Please send a real patch. Take a look at the other patches sent to the
ecos-discuss list. Edit the ChangeLog file to show what you changed
and why. Then do cvs diff -u packacges/net/snmp and send the patch it
generates. We don't accept fixes in any other format.
Thanks
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss