diff options
Diffstat (limited to 'source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff')
-rw-r--r-- | source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff b/source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff new file mode 100644 index 00000000..d34aa78d --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff @@ -0,0 +1,32 @@ +--- 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); + } |