summaryrefslogtreecommitdiff
path: root/package/busybox/patches/610-syslog-remote-retry-connection.patch
diff options
context:
space:
mode:
authorAlexandros C. Couloumbis <alex@ozo.com>2010-08-15 09:53:21 +0000
committerAlexandros C. Couloumbis <alex@ozo.com>2010-08-15 09:53:21 +0000
commite0d13e77d09997a13c73b58dd3e6232d45c8d1a5 (patch)
tree6713ede79915815b117035c65a1ce7a8c87bf7bf /package/busybox/patches/610-syslog-remote-retry-connection.patch
parent462dabc7f55d5e5f0aa7d63c10b66e25a091f405 (diff)
downloadmtk-20170518-e0d13e77d09997a13c73b58dd3e6232d45c8d1a5.zip
mtk-20170518-e0d13e77d09997a13c73b58dd3e6232d45c8d1a5.tar.gz
mtk-20170518-e0d13e77d09997a13c73b58dd3e6232d45c8d1a5.tar.bz2
package/busybox: update to busybox-1.7.1, include upstream patches
SVN-Revision: 22659
Diffstat (limited to 'package/busybox/patches/610-syslog-remote-retry-connection.patch')
-rw-r--r--package/busybox/patches/610-syslog-remote-retry-connection.patch57
1 files changed, 32 insertions, 25 deletions
diff --git a/package/busybox/patches/610-syslog-remote-retry-connection.patch b/package/busybox/patches/610-syslog-remote-retry-connection.patch
index 5602e2b..949ac9f 100644
--- a/package/busybox/patches/610-syslog-remote-retry-connection.patch
+++ b/package/busybox/patches/610-syslog-remote-retry-connection.patch
@@ -1,40 +1,47 @@
-Index: busybox-1.16.1/sysklogd/syslogd.c
-===================================================================
---- busybox-1.16.1.orig/sysklogd/syslogd.c 2010-03-28 13:44:04.000000000 -0400
-+++ busybox-1.16.1/sysklogd/syslogd.c 2010-06-17 21:48:11.000000000 -0400
-@@ -555,6 +555,7 @@
+--- a/sysklogd/syslogd.c
++++ b/sysklogd/syslogd.c
+@@ -98,6 +98,8 @@ struct globals {
+ GLOBALS
+
+ #if ENABLE_FEATURE_REMOTE_LOG
++ len_and_sockaddr *remoteAddr;
++ int remoteFD;
+ llist_t *remoteHosts;
+ #endif
+ #if ENABLE_FEATURE_IPC_SYSLOG
+@@ -554,6 +556,7 @@ static void do_syslogd(void) NORETURN;
static void do_syslogd(void)
{
int sock_fd;
+ int send_err = 0;
- #if ENABLE_FEATURE_SYSLOGD_DUP
- int last_sz = -1;
- char *last_buf;
-@@ -632,10 +633,23 @@
- * over network, mimic that */
- recvbuf[sz] = '\n';
- /* send message to remote logger, ignore possible error */
+ #if ENABLE_FEATURE_REMOTE_LOG
+ llist_t *item;
+ #endif
+@@ -637,10 +640,23 @@ static void do_syslogd(void)
+ continue;
+ }
+ /* Send message to remote logger, ignore possible error */
- /* TODO: on some errors, close and set G.remoteFD to -1
- * so that DNS resolution and connect is retried? */
-- sendto(G.remoteFD, recvbuf, sz+1, MSG_DONTWAIT,
-- &G.remoteAddr->u.sa, G.remoteAddr->len);
-+ if ( sendto(G.remoteFD, recvbuf, sz+1, MSG_DONTWAIT,
-+ &G.remoteAddr->u.sa, G.remoteAddr->len) == -1 ) {
+- sendto(rh->remoteFD, recvbuf, sz+1, MSG_DONTWAIT,
+- &(rh->remoteAddr->u.sa), rh->remoteAddr->len);
++ if (sendto(rh->remoteFD, recvbuf, sz+1, MSG_DONTWAIT,
++ &G.remoteAddr->u.sa, G.remoteAddr->len) == -1 ) {
+ send_err = errno;
-+ }
++ }
+
+ /* On some errors, close and set G.remoteFD to -1
+ * so that DNS resolution and connect is retried */
-+ switch (send_err) {
-+ case ECONNRESET:
-+ case EDESTADDRREQ:
-+ case EISCONN:
-+ case ENOTCONN:
-+ case EPIPE:
++ switch (send_err) {
++ case ECONNRESET:
++ case EDESTADDRREQ:
++ case EISCONN:
++ case ENOTCONN:
++ case EPIPE:
+ close(G.remoteFD);
+ G.remoteFD = -1;
+ break;
-+ }
- no_luck: ;
++ }
}
#endif
+ if (!ENABLE_FEATURE_REMOTE_LOG || (option_mask32 & OPT_locallog)) {