summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch')
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch
new file mode 100644
index 000000000..d183d9183
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [1]
+
+[1] Not the author, the patch is from:
+http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
+
+--- rdist-6.1.5/src/message.c.thestokes 2006-04-19 17:30:39.000000000 -0400
++++ rdist-6.1.5/src/message.c 2006-04-19 17:36:37.000000000 -0400
+@@ -793,15 +793,20 @@
+ char *msg;
+ {
+ static char buf[MSGBUFSIZ];
+-
+- ++nerrs;
+-
+- if (isserver)
+- (void) sprintf(buf, "REMOTE ERROR: %s", msg);
+- else
+- (void) sprintf(buf, "LOCAL ERROR: %s", msg);
+-
+- _message(MT_FERROR, buf);
++ /* Don't reenter this function. There is a nasty infinite recursion
++ case that pops up when msgsndnotify tries to exit. */
++ static int inside=0;
++
++ if(inside==0){
++ ++nerrs;
++ inside=1;
++
++ if (isserver)
++ (void) sprintf(buf, "REMOTE ERROR: %s", msg);
++ else
++ (void) sprintf(buf, "LOCAL ERROR: %s", msg);
++ _message(MT_FERROR, buf);
++ }
+
+ exit(nerrs);
+ }
OpenPOWER on IntegriCloud