[PATCH]: Syslog remote logging fails if network not available on first attempt

Daniel Dickinson cshore at csolve.net
Sun Jun 27 13:05:32 UTC 2010


The attached patch fixes a bug (or missing feature) in busybox's syslog
implementation.  The current implementation only makes one connection
attempt to the remote host, so that if the network or host is
unavailable when syslog first makes an attempt to send a messages to the
remote host messages are never sent.

The attached patch considers certain failures when attempt to transmit a
log message, (ECONNRESET, EDESTADDRREQ, EISCONN, ENOTCONN, EPIPE) as
cause to close and remove the connection socket so that on the next
syslog message to be sent, another connection will be tried.

Signed-Off-By: Daniel Dickinson <cshore at csolve.net>
-- 
And that's my crabbing done for the day.  Got it out of the way early, 
now I have the rest of the afternoon to sniff fragrant tea-roses or 
strangle cute bunnies or something.   -- Michael Devore
GnuPG Key Fingerprint 86 F5 81 A5 D4 2E 1F 1C      http://gnupg.org
The C Shore (Daniel Dickinson's Website) http://cshore.is-a-geek.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: syslog-remote-retry.patch
Type: text/x-patch
Size: 1278 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20100627/7a50ec20/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20100627/7a50ec20/attachment.pgp>


More information about the busybox mailing list