[PATCH] more data structures public in mongoose.h

Ben Gras beng at shrike-systems.com
Wed Nov 19 18:16:56 UTC 2014


The attached patch is a proposed solution to a problem I am having with
interfacing with the mongoose httpd for which I've found no canonical (or
any other) clean solution.

The problem is that some of the data structures needed for some operations,
specifically writing callbacks that get invoked for some HTTP requests, are
declared in mongoose.c and therefore are not available to external
programs, i.e. clients of mongoose. This is the mg_connection struct & its
dependencies. It is passed as an argument to callbacks, and even without
referencing the object the code won't compile if the struct isn't fully
known.

The change is moving some declarations from mongoose.c to mongoose.h.

Unfortunately this diverges from the original code, then again mongoose
isn't tracked any more since the license change I take it, so perhaps
that's not so bad. I've made the changes __rtems__-conditional so it's
clear where the divergence is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20141119/e86cda23/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mongoose.h.patch
Type: text/x-diff
Size: 6472 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20141119/e86cda23/attachment-0001.bin>


More information about the devel mailing list