diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-03 01:12:43 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-03 01:12:43 +0100 |
commit | 190ee6ac443d2ab65f62fffb3cb2b48a12e97ea5 (patch) | |
tree | 4055a4bc383ec18ec75f0ba6f7137cdc68c25bce /uhttpd.h | |
parent | 50aedc3c47d1f23981b3a6aed713b944b68b06db (diff) |
declare dispatch struct type
Diffstat (limited to 'uhttpd.h')
-rw-r--r-- | uhttpd.h | 37 |
1 files changed, 19 insertions, 18 deletions
@@ -137,6 +137,24 @@ struct dispatch_handler { void (*handle_request)(struct client *cl, const char *url, struct path_info *pi); }; +struct dispatch { + 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; + struct { + struct blob_buf hdr; + struct relay r; + int status_code; + char *status_msg; + } proc; + }; +}; + struct client { struct list_head list; int id; @@ -154,24 +172,7 @@ struct client { struct uh_addr srv_addr, peer_addr; struct blob_buf hdr; - - 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; - struct { - struct blob_buf hdr; - struct relay r; - int status_code; - char *status_msg; - } proc; - }; - } dispatch; + struct dispatch dispatch; }; extern char uh_buf[4096]; |