Fork 0
Commit Graph

21 Commits

Author SHA1 Message Date
Stefan Bühler acd2967534 assert many previously unchecked return values, handle some explicitly, remove FD_CLOEXEC in worker - mustn't fork 2014-04-15 11:11:51 +02:00
Stefan Bühler 17a5168793 [core] convert all assert() to LI_FORCE_ASSERT(), and support writing backtraces on fatal errors with libunwind 2014-04-11 11:40:24 +02:00
Stefan Bühler e76ebe2021 [core] rewrite config parser
* no more hash values - only lists and list of key-value pairs
 * "master" config:
   the config loaded on startup can use all features,
   configs loaded later (vhost on demand from sql...) can't use
   include* and cannot modify global vars.
 * scoped variables
   - add a global var store in the server struct
   - global vars can be set with "global foo = bar"
   - if a variable already exists in a scope it will be modified on a
	 write, otherwise a new local variable is created
   - global vars won't be modified if not in "master" mode
   - vars can be made explicitly local with "local foo = bar"; create a
	 local copy with "local foo = foo"
   - globals vars are available in live config loads for reading
   - each file and action block {...} creates a new scope; if/else branches do
	 NOT create a new scope
 * to append a value to a list use "l + [v]" (not "l + v" anymore);
   lists are concatenated with "+"
 * [...] always marks a list
 * (...) is a list if it contains a "," or "=>", otherwise it justs
   groups an expression
 * a list can either contain key-value pairs or other values. mixing is
   not allowed
2013-09-06 16:43:26 +02:00
Stefan Bühler 709296d796 fix bugs and warnings from compiler warnings (memset parameter order, shadow, ...) 2013-05-25 12:59:14 +02:00
Stefan Bühler a937bd437a fix missing li prefixes 2013-05-23 17:56:24 +02:00
Stefan Bühler cfd8955008 [common] implement libev wrapper
* need a way to mark a watcher as "don't keep the loop alive"
2013-05-23 17:56:23 +02:00
Stefan Bühler ff69160c34 [core] Use streams 2013-05-23 12:01:04 +02:00
Stefan Bühler 20a63070e2 [chunks] extract to plain memory 2013-05-17 15:40:20 +02:00
Stefan Bühler b1c45e6a8f [chunk/network] use glib error system to report errors (instead of using virtualrequest context) 2012-03-16 15:44:22 +01:00
Stefan Bühler 89a32e1504 [chunkqueue] skip setting limit if it is the current one 2011-12-19 16:39:54 +01:00
Stefan Bühler 7d938e48e3 [log] Fix prepare handler 2010-09-05 14:19:27 +02:00
Stefan Bühler 048a7d9144 Append to previous buffer in network reads, save used buffer in custom location 2010-02-10 22:25:48 +01:00
Stefan Bühler 750bd453a2 Append to previous buffer in network reads 2010-02-02 00:34:34 +01:00
Stefan Bühler c5f6c3166d Replace lseek()+read() with pread() in chunk.c 2009-12-02 20:24:16 +01:00
Stefan Bühler 0c3ca6b13b add liBuffer: a reference-counted memory chunk (using mempool) for basic network data 2009-11-29 17:54:01 +01:00
Stefan Bühler c3ae0163c8 Use less pointers in chunks, "inline" structures 2009-11-08 11:12:12 +01:00
Stefan Bühler 24a34c3633 Export li_chunkfile functions 2009-10-07 22:48:57 +02:00
Stefan Bühler 1acacd5737 Prefix inline api functions with li_ 2009-09-26 20:31:52 +02:00
Stefan Bühler c6bd0d66b7 Fix fd leak 2009-09-17 09:54:34 +02:00
Stefan Bühler a061745193 Fix bugs found with the static clang analyzer (http://clang-analyzer.llvm.org/) 2009-07-16 22:13:40 +02:00
Stefan Bühler 540ff7db02 Split sources into subdirs 2009-07-15 11:57:52 +02:00