~ubuntu-branches/ubuntu/hardy/lighttpd/hardy

« back to all changes in this revision

Viewing changes to src/configfile.c

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-05-01 13:15:59 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070501131559-y8jos9wp79uf3pp4
Tags: 1.4.15-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - Add fam/gamin stat cache engine support
  - Clean environment in init.d script
  - Replace Depends: on perl with Depends: on libterm-readline-perl-perl
  - Make sure that upgrades succeed, even if we can't restart lighttpd
  - DebianMaintainerField update

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
                srv->srvconf.stat_cache_engine = STAT_CACHE_ENGINE_SIMPLE;
219
219
        } else if (buffer_is_equal_string(stat_cache_string, CONST_STR_LEN("simple"))) {
220
220
                srv->srvconf.stat_cache_engine = STAT_CACHE_ENGINE_SIMPLE;
 
221
#ifdef HAVE_FAM_H
221
222
        } else if (buffer_is_equal_string(stat_cache_string, CONST_STR_LEN("fam"))) {
222
223
                srv->srvconf.stat_cache_engine = STAT_CACHE_ENGINE_FAM;
 
224
#endif
223
225
        } else if (buffer_is_equal_string(stat_cache_string, CONST_STR_LEN("disable"))) {
224
226
                srv->srvconf.stat_cache_engine = STAT_CACHE_ENGINE_NONE;
225
227
        } else {
226
228
                log_error_write(srv, __FILE__, __LINE__, "sb",
227
 
                                "server.stat-cache-engine can be one of \"disable\", \"simple\", \"fam\", but not:", stat_cache_string);
 
229
                                "server.stat-cache-engine can be one of \"disable\", \"simple\","
 
230
#ifdef HAVE_FAM_H
 
231
                                " \"fam\","
 
232
#endif
 
233
                                " but not:", stat_cache_string);
228
234
                ret = HANDLER_ERROR;
229
235
        }
230
236
 
866
872
        }
867
873
 
868
874
        if (0 != stream_open(&s, filename)) {
869
 
                log_error_write(srv, __FILE__, __LINE__, "sbss",
870
 
                                "opening configfile ", filename, "failed:", strerror(errno));
871
 
                ret = -1;
 
875
                if (s.size == 0) {
 
876
                        /* the file was empty, nothing to parse */
 
877
                        ret = 0;
 
878
                } else {
 
879
                        log_error_write(srv, __FILE__, __LINE__, "sbss",
 
880
                                        "opening configfile ", filename, "failed:", strerror(errno));
 
881
                        ret = -1;
 
882
                } 
872
883
        } else {
873
884
                tokenizer_init(&t, filename, s.start, s.size);
874
885
                ret = config_parse(srv, context, &t);