-const char jcc_rcs[] = "$Id: jcc.c,v 2.4 2002/12/28 03:58:19 david__schmidt Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 2.6 2003/06/24 12:24:24 oes Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/src/jcc.c,v $
*
* Revisions :
* $Log: jcc.c,v $
+ * Revision 2.6 2003/06/24 12:24:24 oes
+ * Added a line plus Fix-me as a reminder to fix broken force handling in trunk. Thanks to lionel for the hint
+ *
+ * Revision 2.5 2003/01/26 20:24:26 david__schmidt
+ * Updated activity console instrumentation locations
+ *
* Revision 2.4 2002/12/28 03:58:19 david__schmidt
* Initial drop of dashboard instrumentation - enabled with
* --enable-activity-console
#define sleep(N) DosSleep(((N) * 100))
#endif
+#ifdef OSX_DARWIN
+/*
+ * Hit OSX over the head with a hammer. Protect all *_r functions.
+ */
+pthread_mutex_t gmtime_mutex;
+pthread_mutex_t localtime_mutex;
+pthread_mutex_t gethostbyaddr_mutex;
+pthread_mutex_t gethostbyname_mutex;
+#endif /* def OSX_DARWIN */
+
#if defined(unix) || defined(__EMX__)
-const char *basedir;
+const char *basedir = NULL;
const char *pidfile = NULL;
int received_hup_signal = 0;
#endif /* defined unix */
InitWin32();
#endif
+#ifdef OSX_DARWIN
+ /*
+ * Prepare global mutex semaphores
+ */
+ pthread_mutex_init(&gmtime_mutex,0);
+ pthread_mutex_init(&localtime_mutex,0);
+ pthread_mutex_init(&gethostbyaddr_mutex,0);
+ pthread_mutex_init(&gethostbyname_mutex,0);
+#endif /* def OSX_DARWIN */
+
/*
* Unix signal handling
*
/* If this request contains the FORCE_PREFIX,
* better get rid of it now and set the force flag --oes
* Changed to use the http structure rather than the req field --jaa
+ * FIXME: This isn't enough -- there is the path and referrer etc! *
*/
if (strstr(http->url, FORCE_PREFIX))
{
strclean(http->url, FORCE_PREFIX);
+ strclean(http->path, FORCE_PREFIX);
log_error(LOG_LEVEL_FORCE, "Enforcing request \"%s\".\n", http->url);
csp->flags |= CSP_FLAG_FORCED;
}