[NeoStats-Devel] [Commits] r2580 - trunk/src
| Newsgroups | gmane.comp.neostats.devel |
|---|---|
| Message-ID | <[email protected]> |
Author: Mark
Date: Wed May 4 06:56:38 2005
New Revision: 2580
Modified:
trunk/src/main.c
Log:
add flag to do_exit to try and avoid infinite loops, if it ever triggers, the code needs fixing
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Wed May 4 06:56:38 2005
@@ -50,7 +50,7 @@
#include "dcc.h"
static void do_reconnect( void );
-
+static int in_do_exit = 0;
#define PID_FILENAME "neostats.pid"
#ifdef WIN32
@@ -476,6 +476,12 @@
{
int return_code;
+ if( in_do_exit )
+ {
+ nlog( LOG_CRITICAL, "BUG: recursive do_exit calls, report this log entry to the NeoStats team" );
+ return;
+ }
+ in_do_exit = 1;
return_code = exit_reports[exitcode].exit_code;
nlog( LOG_CRITICAL, exit_reports[exitcode].exit_message );