[PATCH] Mongoose HTTPd from 3.2 to 3.9 (last commit before MIT -> GPL)

Nick Withers nick.withers at anu.edu.au
Wed Dec 4 00:48:52 UTC 2013


On Mon, 2013-12-02 at 09:44 +1100, Nick Withers wrote:
> On Fri, 2013-11-29 at 13:00 +0100, Sebastian Huber wrote:
> > Hello Nick,
> > 
> > it seems that there was again an API change.  Can you please build with 
> > "--enable-tests" and fix the errors below.  Can you please also run this test 
> > and make sure it passes.
> 
> Will do - thanks Sebastian!

Righto - please find attached an updated patch. Tested the mghttpd01 app
successfully under psim and on MVME3100 hardware (both powerpc).

If this does get committed, it'd be nice to include a warning of the
interface changes on the Wiki (which I'm happy to do :-)). Perhaps the
following (from the commit message, not an exhaustive list of
differences) would do?
____

Note that the API's changed, for example:
  - A ''struct mg_callbacks'' must now be provided to ''mg_start()''. Initialise members to ''NULL'' to disable various types of callbacks
  - Callback interfaces have changed significantly in general
  - The short form of options (e.g., "u" instead of "run_as_user") are no longer available (upstream)
  - The "max_request_size" options has been removed
____

[Note: Not supplying a callback structure correctly is particularly
nasty. Passing in NULL, as used to be acceptable, is unchecked by
mg_start() and will cause a NULL-pointer dereference and bollocks
callback pointers, which'll cause fun some time later when they're used!
]

Cheers!
-- 
Nick Withers

Embedded Systems Programmer
Room 2.26, Building 57
Department of Nuclear Physics
Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)

eMail: nick.withers at anu.edu.au
Phone: +61 2 6125 2091
Mobile: +61 414 397 446
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mongoose-3.9.patch
Type: text/x-patch
Size: 219129 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20131204/666bebee/attachment-0001.bin>


More information about the devel mailing list