r24780: More work allowing libutil to be used by external users.
[kai/samba.git] / source4 / web_server / http.c
index 30ca17411ebf27bd8f7ca4fcfb1617f63a244d6c..502d5de2d0646480290950e6a0155fd9317134b4 100644 (file)
@@ -7,7 +7,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
@@ -27,6 +26,7 @@
 #include "smbd/service.h"
 #include "lib/events/events.h"
 #include "system/time.h"
+#include "system/wait.h"
 #include "lib/appweb/esp/esp.h"
 #include "lib/appweb/ejs/ejsInternal.h"
 #include "lib/util/dlinklist.h"
@@ -196,9 +196,8 @@ static int http_mapToStorage(EspHandle handle, char *path, int len, const char *
 static int http_writeBlock(EspHandle handle, const char *buf, int size)
 {
        struct websrv_context *web = talloc_get_type(handle, struct websrv_context);
-       NTSTATUS status;
-       status = data_blob_append(web, &web->output.content, buf, size);
-       if (!NT_STATUS_IS_OK(status)) return -1;
+       if (!data_blob_append(web, &web->output.content, buf, size))
+               return -1;
        return size;
 }
 
@@ -484,7 +483,6 @@ static void http_setup_arrays(struct esp_state *esp)
    it hits a major error. We need to catch these and
    report a internal server error via http
 */
-#include <setjmp.h>
 static jmp_buf ejs_exception_buf;
 static const char *exception_reason;