Joris Vink
d5cd89c544
s/kore_pgsql/pgsql and s/kore_tasks/tasks
2014-07-03 22:15:11 +02:00
Joris Vink
2c6b5e6b0f
Normalize kore_*.h headers
2014-07-03 22:14:46 +02:00
Joris Vink
4f126f51d3
Add install/uninstall targets.
2014-07-03 21:38:16 +02:00
Joris Vink
00a180c445
Correct return value check for kore_task_channel_read().
...
The data we're using are not NUL-terminated strings.
2014-07-03 20:21:05 +02:00
Joris Vink
2bf43fe5f8
Unfuck boundary snprintf check, broke multipart forms
2014-07-03 20:10:55 +02:00
Joris Vink
be4b1c7e7b
Move actual code out of contrib into src/.
2014-07-02 12:19:38 +02:00
Joris Vink
5090ebea20
Move contrib/modules to contrib/examples
2014-07-02 12:16:31 +02:00
Joris Vink
2821eccdfa
Move tools to contrib/tools
2014-06-30 23:19:16 +02:00
Joris Vink
fe7ca9779f
Add task example using libcurl.
2014-06-30 22:35:36 +02:00
Joris Vink
a54d04eb8a
Add task glue for BSD as well
2014-06-30 14:43:34 +02:00
Joris Vink
fff0a763ae
Let tasks only start after kore_task_run() is called.
2014-06-30 14:35:32 +02:00
Joris Vink
ed1e5e249e
Sprinkle volatile
2014-06-30 14:23:04 +02:00
Joris Vink
80c0a4cb6e
Task improvements.
...
Allow tasks to return errors.
Make kore_task_channel_read() return the number of bytes
that was coming in, this way we can detect any truncations.
2014-06-30 14:22:23 +02:00
Joris Vink
56a3cfa6c8
Mention background tasks
2014-06-30 10:11:45 +02:00
Joris Vink
723c99b65e
Move kore_pgsql.h into includes/ directly.
...
Much like kore_tasks.h
2014-06-30 08:42:18 +02:00
Joris Vink
dbd74c4551
Don't call module onloads until after everything is initialized.
...
This means the onload functions for a module are now called
after a worker has started and never from the parent ever again.
2014-06-29 21:15:23 +02:00
Joris Vink
8ba29104eb
Task improvements.
...
Make sure req is initialized to NULL.
Schedule a task on the event loop only when bound to a request.
2014-06-29 21:14:43 +02:00
Joris Vink
b9bd2e9a14
Move tasks away from http_requests.
...
Instead if a task is used from inside a request
you MUST call kore_task_bind_request() on it.
This way we can move forward for tasks that
don't belong to page handlers.
Also, some bug fixes for removing http_requests
that are indeed linked to a currently running task.
2014-06-29 20:20:13 +02:00
Joris Vink
146a0189ab
More work on the background task implementation.
...
Tasks are now assigned to available threads instead
of a global task list.
You can now pass messages between your page handler
and the created task using the kore_task_channel_*
functions.
Only one task per time can be assigned to a request
but I feel this is probably a bad design choice.
Preferably we'd want to be able to start tasks
regardless of being in a page handler or not,
this not only ads flexibility but seems like
a better choice overall as it opens a lot more
possibilities about how tasks can be used.
2014-06-29 14:15:40 +02:00
Joris Vink
cf700b34f7
Add initial stab at asynchronous background tasks.
...
More to follow.
2014-06-28 16:17:18 +02:00
Joris Vink
437f2e9ed2
Be paranoia when it comes to using client supplied integers
2014-05-06 12:24:21 +02:00
Joris Vink
521d4d215e
Keep on hackin' Keep on hackin'
2014-04-24 11:18:40 +02:00
Joris Vink
0cb983adc0
Correct snprintf() usage
2014-04-23 16:29:58 +02:00
Joris Vink
27ec8a1d58
Don't let kore_strlcpy() overflow a buffer that is 1 byte long
2014-04-23 14:48:29 +02:00
Joris Vink
f3fe543358
Add integer overflow checks to kore_calloc
2014-04-23 14:26:28 +02:00
Joris Vink
fd7f547013
Fix accesslog under SPDY connections
2014-04-23 13:18:37 +02:00
Joris Vink
2cc6730cba
Improve base64 decoding
2014-04-23 12:32:54 +02:00
Joris Vink
4f31d53e76
Allow KORE_RESULT_RETRY from authentication blocks
2014-04-22 23:07:24 +02:00
Joris Vink
332e8f4ba0
Do a better job at base64 decoding stuff
2014-04-22 21:45:26 +02:00
Joris Vink
c14f3031ff
Allow us to include config files with "include"
2014-04-22 13:15:19 +02:00
Joris Vink
2bdc9210a0
Wrap with KORE_PEDANTIC_MALLOC
2014-04-22 13:05:16 +02:00
Joris Vink
d98d56fb20
Add KORE_PENDANTIC_MALLOC option.
...
This option tells Kore to zero out memory when allocated, freed or
when get/put from the pools.
2014-04-22 12:46:23 +02:00
Joris Vink
39dd9d7972
Change kore_buf_appendv() to take a va_list
2014-04-22 12:16:21 +02:00
Joris Vink
d2618db525
Kill __packed__ attributes on some data structs
2014-04-18 17:41:56 +02:00
Joris Vink
109c17fe5d
Mention postgresql support (compile with PGSQL=1)
2014-04-17 11:16:37 +02:00
Joris Vink
d6d6f96ca0
Kore pgsql improvements.
...
Don't wait for a full event loop until we call the page handler
for a received pgsql result. This speeds up page loads using
KORE_PGSQL by quite a lot, especially on a non busy server.
2014-04-17 10:49:48 +02:00
Joris Vink
94de8b27d2
Make sure we call pgsql_load
2014-04-17 09:52:58 +02:00
Joris Vink
c206f3be89
Check if req is NULL before dereferencing it.
2014-04-16 22:15:22 +02:00
Joris Vink
52a0764812
HTTP Post improvements for handlers.
...
Don't crash if we get a Content-length:0 on POST and our
handlers call http_populate_arguments().
2014-04-15 21:18:23 +02:00
Joris Vink
a35a5182a7
Check connection string right before we connect
2014-04-14 08:45:31 +02:00
Joris Vink
6cabe00740
Make the pgsql connstring programmatically configurable
2014-04-14 08:41:41 +02:00
Joris Vink
4b7a458de6
If kore_pgsql_query() fails, relay this properly
2014-04-13 23:43:54 +02:00
Joris Vink
3f7e7e696e
Kill daemon deprication warning on osx. We get it.
2014-04-12 18:49:32 +02:00
Joris Vink
8e88ac41ff
Ignore DSYM on osx
2014-04-12 18:49:32 +02:00
Joris Vink
1c685cce90
Comment on why/how we're disabling freelists.
...
OpenBSD was clever enough to throw these out so no need to
munge the freelist stuff there anymore.
2014-04-11 08:46:50 +02:00
Joris Vink
95819d2dc2
Take away SSL_MODE_RELEASE_BUFFERS for now.
...
Prevents the weird freelist munging that happens when we're
actually freeing memory (which we should be forcing it to do
by setting freelist_max_len to 0).
2014-04-10 22:52:23 +02:00
Joris Vink
5e2fb37c53
Add *.module to gitignore
2014-04-09 19:14:24 +02:00
Joris Vink
41d1456cb8
Don't leak version on error
2014-04-09 14:45:51 +02:00
Joris Vink
76383f2353
Close fp after reading configuration
2014-04-09 14:43:23 +02:00
Joris Vink
250a1e1ad1
Fix use after free
2014-04-09 14:35:14 +02:00