Specifying a config-file has no effect in main.c when built with
CHEROKEE_EMBEDDED. Suggested patch:

--- orig/cherokee/main.c     Sat Aug 13 16:42:39 2005
+++ cherokee/main.c  Fri Oct 14 22:33:36 2005
@@ -35,6 +35,14 @@

#include "server.h"

+#ifndef CHEROKEE_EMBEDDED
+# define GETOPT_OPT  "C:b"
+# define CONFIG_FILE "[-C configfile] "
+#else
+# define GETOPT_OPT  "b"
+# define CONFIG_FILE ""
+#endif
+
static cherokee_server_t  *srv         = NULL;
static char               *config_file = NULL;
static cherokee_boolean_t  daemon_mode = false;
@@ -103,7 +111,7 @@
{
       int c;

-       while ((c = getopt(argc, argv, "C:b")) != -1) {
+       while ((c = getopt(argc, argv, GETOPT_OPT)) != -1) {
               switch(c) {
               case 'C':
                       config_file = strdup(optarg);
@@ -114,7 +122,7 @@
                       break;

               default:
-                       fprintf (stderr, "Usage: %s [-C configfile] [-b]\n", 
argv[0]);
+                       fprintf (stderr, "Usage: %s %s[-b]\n", argv[0], 
CONFIG_FILE);
                       exit(1);
               }
       }
-----------

But I fail to see why a config-file couldn't be used in an embedded build.

Gisle V.

# rm /bin/laden /bin/laden: Not found _______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to