chiark / gitweb /
microhttpd-util: use static buffer for static messages
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Mar 2014 00:05:50 +0000 (20:05 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Mar 2014 05:55:48 +0000 (01:55 -0400)
commite7216d112aff3ba4ce196db95b86d77d5a1b234e
tree26b7e09325919ebff2cb06396250e3c4e7ea2982
parentcc64d0175a3c2c974709e9962c00fbe04d74c43f
microhttpd-util: use static buffer for static messages

Most of the messages we send do not require a allocating and
freeing a buffer, to optimize this by using const strings.

Also, rename respond_error to mhd_respond*, since it is used
not only for errors.

Make use of information from printf to avoid one extra call to
strlen.
src/journal/journal-gatewayd.c
src/journal/journal-remote.c
src/journal/microhttpd-util.c
src/journal/microhttpd-util.h