declare dispatch struct type
authorFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 00:12:43 +0000 (01:12 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 00:12:43 +0000 (01:12 +0100)
uhttpd.h

index 4c09c129422aebee0bba242b27f768f36f3d1b88..e92c46916d0eb2a8172c4be6a49285e9128b4d1b 100644 (file)
--- a/uhttpd.h
+++ b/uhttpd.h
@@ -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];