X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuhttpd.git;a=blobdiff_plain;f=uhttpd.h;h=a465a3dbf2c5d2cb0d27e92de59f2d47ab683df7;hp=c023affed9f9f3d0e68d98f1b78ef19338e5171e;hb=38801a320d3f10de1f8ebfffd8964a1ad6d511f4;hpb=32760c47e28d2a4313359cbff4bd93c905cc85dd;ds=sidebyside diff --git a/uhttpd.h b/uhttpd.h index c023aff..a465a3d 100644 --- a/uhttpd.h +++ b/uhttpd.h @@ -28,6 +28,7 @@ #include #include #include +#include #include "utils.h" @@ -40,6 +41,7 @@ struct config { char *realm; char *file; char *error_handler; + char *cgi_prefix; int no_symlinks; int no_dirlists; int network_timeout; @@ -52,9 +54,9 @@ struct config { struct auth_realm { struct list_head list; - char path[PATH_MAX]; - char user[32]; - char pass[128]; + char *path; + char *user; + char *pass; }; enum http_method { @@ -116,15 +118,17 @@ struct client { struct blob_buf hdr; - void (*dispatch_write_cb)(struct client *cl); - void (*dispatch_free)(struct client *cl); - - union { - struct { - struct blob_attr **hdr; - int fd; - } file; - } data; + struct { + void (*write_cb)(struct client *cl); + void (*close_fds)(struct client *cl); + void (*free)(struct client *cl); + union { + struct { + struct blob_attr **hdr; + int fd; + } file; + }; + } dispatch; }; extern int n_clients; @@ -156,4 +160,7 @@ void uh_handle_file_request(struct client *cl); void uh_auth_add(const char *path, const char *user, const char *pass); +void uh_close_listen_fds(void); +void uh_close_fds(void); + #endif