Joris Vink
1d8fc99920
Add glue to build task_curl example under osx
2014-07-18 16:09:15 +02:00
Joris Vink
e0f30e1ae7
Fix broken include paths and lib paths
2014-07-18 16:05:19 +02:00
Joris Vink
a5806d91f8
Pull in pg_config.h correctly, fixes compilation for pgsql under OpenBSD
2014-07-18 15:59:07 +02:00
Joris Vink
c3ea0e9e66
Include pthread.h in tasks.h, fixes compilation under OpenBSD
2014-07-18 15:51:13 +02:00
Joris Vink
86434a57c1
Bump to 1.2-release in preparation of the actual release
2014-07-17 10:22:45 +02:00
Joris Vink
5d4f956f69
Rewrite some comments as task behaviour has changed
2014-07-08 09:12:05 +02:00
Joris Vink
19d146a09e
Introduce http_request_sleep() and http_request_wakeup().
...
These 2 functions can be used to move an HTTP request
from/to the active http_requests list. Effectively
putting them to "sleep" or "waking them up".
Sprinkle this through the pgsql and task code.
If used correctly greatly reduces overhead for
managing sleeping tasks.
2014-07-04 16:51:19 +02:00
Joris Vink
7b6c03ca5b
Task improvements.
...
Synchronize access to state/result properly so one
can access these from inside the task as well.
Introduce KORE_TASK_STATE_ABORT which will be set
when a task needs to be abort. You can use this
to create tasks that run in a loop until aborted.
2014-07-04 11:28:17 +02:00
Joris Vink
baac693f2f
Change type for data to void *
2014-07-04 11:25:05 +02:00
Joris Vink
423d57b08d
Add -v to dump out version and compiled in features
2014-07-04 09:25:18 +02:00
Joris Vink
35479f7ee7
Fix module configuration
2014-07-04 09:14:34 +02:00
Joris Vink
1ad9f039ab
Add pgsql_conn_max configuration parameter.
...
Allows you to tune how many pgsql connections kore
will make at one time.
2014-07-04 09:14:05 +02:00
Joris Vink
8b20dec081
Add missing pg_config.h header
2014-07-04 09:03:19 +02:00
Joris Vink
8e0ab8cc61
Check for pg version >= 90200 before using PGRES_SINGLE_TUPLE
2014-07-03 22:58:04 +02:00
Joris Vink
b2f31fbcdb
remove balsy text
2014-07-03 22:41:56 +02:00
Joris Vink
83b7d64bc0
consistency
2014-07-03 22:40:55 +02:00
Joris Vink
5869f765b0
Update with more instructions
2014-07-03 22:40:12 +02:00
Joris Vink
d4386195da
Bring back pgsql_test.c
2014-07-03 22:40:03 +02:00
Joris Vink
beee96cb03
Correct headers now that they are installed
...
While here, kill some MEDIA things for libs that
don't need it and such and such.
2014-07-03 22:39:32 +02:00
Joris Vink
b6a778a4a5
Install kore headers under /usr/local/include/kore
2014-07-03 22:39:16 +02:00
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