~ubuntu-branches/ubuntu/wily/lighttpd/wily

« back to all changes in this revision

Viewing changes to src/server.c

  • Committer: Package Import Robot
  • Author(s): Artur Rona
  • Date: 2015-01-26 02:36:43 UTC
  • mfrom: (6.1.29 sid)
  • Revision ID: package-import@ubuntu.com-20150126023643-jlpq8pvr3475kbf2
Tags: 1.4.35-4ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/patches/add-lighttpd.pc-configure.patch:
    + Add lighttpd.pc to ac_config_files to fix FTBFS: make[3]:
      *** No rule to make target `lighttpd.pc', needed by `all-am'.
  - debian/patches/build-dev-package.patch,
    debian/control, debian/lighttpd-dev.install:
    + Add lighttpd-dev package.
  - debian/index.html:
    + Corrected BTS Ubuntu link and branding on the default page.
  - debian/lighttpd.conf:
    + Comment 'use-ipv6.pl' by default, which causes failure
      to bind port in ipv4.
  - debian/control:
    + Build-Depends on libgamin-dev rather than libfam-dev
      to fix startup warning.
  - debian/rules:
    + Add override_dh_installinit to set "defaults 91 09" to not
      start before apache2 but in the same runlevel with
      the same priority.
  - debian/lighttpd.dirs, debian/control, debian/rules,
    debian/lighttpd.ufw.profile:
    + Add the UFW profile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
        FILE *frandom = NULL;
173
173
 
174
174
        server *srv = calloc(1, sizeof(*srv));
175
 
        assert(srv);
 
175
        force_assert(srv);
176
176
#define CLEAN(x) \
177
177
        srv->x = buffer_init();
178
178
 
230
230
        srv->startup_ts = srv->cur_ts;
231
231
 
232
232
        srv->conns = calloc(1, sizeof(*srv->conns));
233
 
        assert(srv->conns);
 
233
        force_assert(srv->conns);
234
234
 
235
235
        srv->joblist = calloc(1, sizeof(*srv->joblist));
236
 
        assert(srv->joblist);
 
236
        force_assert(srv->joblist);
237
237
 
238
238
        srv->fdwaitqueue = calloc(1, sizeof(*srv->fdwaitqueue));
239
 
        assert(srv->fdwaitqueue);
 
239
        force_assert(srv->fdwaitqueue);
240
240
 
241
241
        srv->srvconf.modules = array_init();
242
242
        srv->srvconf.modules_dir = buffer_init_string(LIBRARY_DIR);
1001
1001
        if (pid_fd != -1) {
1002
1002
                buffer_copy_long(srv->tmp_buf, getpid());
1003
1003
                buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("\n"));
 
1004
                force_assert(srv->tmp_buf->used > 0);
1004
1005
                write(pid_fd, srv->tmp_buf->ptr, srv->tmp_buf->used - 1);
1005
1006
                close(pid_fd);
1006
1007
                pid_fd = -1;
1182
1183
#ifdef HAVE_FAM_H
1183
1184
        /* setup FAM */
1184
1185
        if (srv->srvconf.stat_cache_engine == STAT_CACHE_ENGINE_FAM) {
1185
 
                if (0 != FAMOpen2(srv->stat_cache->fam, "lighttpd")) {
 
1186
                if (0 != FAMOpen2(&srv->stat_cache->fam, "lighttpd")) {
1186
1187
                        log_error_write(srv, __FILE__, __LINE__, "s",
1187
1188
                                         "could not open a fam connection, dieing.");
1188
1189
                        return -1;
1189
1190
                }
1190
1191
#ifdef HAVE_FAMNOEXISTS
1191
 
                FAMNoExists(srv->stat_cache->fam);
 
1192
                FAMNoExists(&srv->stat_cache->fam);
1192
1193
#endif
1193
1194
 
1194
 
                srv->stat_cache->fam_fcce_ndx = -1;
1195
 
                fdevent_register(srv->ev, FAMCONNECTION_GETFD(srv->stat_cache->fam), stat_cache_handle_fdevent, NULL);
1196
 
                fdevent_event_set(srv->ev, &(srv->stat_cache->fam_fcce_ndx), FAMCONNECTION_GETFD(srv->stat_cache->fam), FDEVENT_IN);
 
1195
                fdevent_register(srv->ev, FAMCONNECTION_GETFD(&srv->stat_cache->fam), stat_cache_handle_fdevent, NULL);
 
1196
                fdevent_event_set(srv->ev, &(srv->stat_cache->fam_fcce_ndx), FAMCONNECTION_GETFD(&srv->stat_cache->fam), FDEVENT_IN);
1197
1197
        }
1198
1198
#endif
1199
1199