-const char jcc_rcs[] = "$Id: jcc.c,v 1.154 2007/10/19 17:00:08 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.157 2007/11/03 17:34:49 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*
* Revisions :
* $Log: jcc.c,v $
+ * Revision 1.157 2007/11/03 17:34:49 fabiankeil
+ * Log the "weak randomization factor" warning only
+ * once for mingw32 and provide some more details.
+ *
+ * Revision 1.156 2007/11/01 18:20:58 fabiankeil
+ * Initialize log module after initializing mutexes, future
+ * deadlocks in that code should now work cross-platform.
+ *
+ * Revision 1.155 2007/10/23 20:12:45 fabiankeil
+ * Fix first CSUCCEED line to end in \r\n as required by RFC1945.
+ * Reported by Bert van Leeuwen in BR#1818808.
+ *
* Revision 1.154 2007/10/19 17:00:08 fabiankeil
* Downgrade "Flushing header and buffers" message to LOG_LEVEL_INFO.
*
* This is NOT the body, so
* Let's pretend the server just sent us a blank line.
*/
+ log_error(LOG_LEVEL_INFO,
+ "Malformerd HTTP headers detected and MS IIS5 hack enabled. "
+ "Expect an invalid response or even no response at all.");
snprintf(buf, sizeof(buf), "\r\n");
len = (int)strlen(buf);
#endif
;
- init_log_module(Argv[0]);
-
/*
* Parse the command line arguments
*
files->next = NULL;
clients->next = NULL;
+ /* XXX: factor out initialising after the next stable release. */
#ifdef AMIGA
InitAmiga();
#elif defined(_WIN32)
/* Prepare mutexes if supported and necessary. */
initialize_mutexes();
+ /* Enable logging until further notice. */
+ init_log_module(Argv[0]);
+
random_seed = (unsigned int)time(NULL);
#ifdef HAVE_RANDOM
srandom(random_seed);
+#elif defined (_WIN32)
+ /*
+ * See pick_from_range() in miscutil.c for details.
+ */
+ log_error(LOG_LEVEL_INFO,
+ "No thread-safe PRNG implemented for your platform. "
+ "Using weak \'randomization\' factor which will "
+ "limit the already questionable usefulness of "
+ "header-time-randomizing actions (disabled by default).");
#else
srand(random_seed);
#endif /* ifdef HAVE_RANDOM */