[Ur] urweb-callback library, urweb patches

Sergey Mironov grrwlf at gmail.com
Wed Feb 26 05:32:06 EST 2014


Hi. I continue my work on urweb-callback. I've dropped the cgi/fastcgi
support (as we have discussed with Adam). The code becomes much
simpler, now it relies on the C++11 threads and requires almost
nothing special from the urweb side.

https://github.com/grwlf/urweb-callback/tree/clonectx

== Pathch1 ==

Still, in order to provide unified method of writing to log (like this
place [1]), I've made some relatively simple changes to the urweb API
interface. The summary of changes is:

* Move struct loggers from request.h to urweb.h and remove uw_app*
field from (it was required by client_pruner only)
* Tweak the code here in there in request.c, move to new loggers
* Add uw_get_loggers function to the urweb.h. Now FFI code can query
uw_loggers and write to it.
* Add separate data structure to pass to client_pruner thread

Also the patch inserts  #include "request.h" into request.c which
should help to keep code safer.

== Patch2 ==

urweb-callback uses -1 as the ctx->id at the moment since we can't (at
least shouldn't) create client sources from the callback context. The
patch just ensures that we notice this kind of errors.


The patches are in attach, please consider reviewing/merging!

Regards,
Sergey

[1] - https://github.com/grwlf/urweb-callback/blob/clonectx/CallbackFFI.cpp#L325
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_of_1_Define_uw_loggers_structure__allow_FFI_code_to_access_it.patch
Type: application/octet-stream
Size: 12126 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20140226/9681a06b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_of_1_Protect_uw_Basis_new_client_source_from_invalid_ctx__id.patch
Type: application/octet-stream
Size: 780 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20140226/9681a06b/attachment-0001.obj>


More information about the Ur mailing list