summaryrefslogtreecommitdiff
path: root/uhttpd.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-03 22:45:18 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-03 22:45:18 +0100
commitaf526c6c2ede713237048a91aaddfa2ce621dc3c (patch)
treee31196f04badda899cd79937cb4afd0caf741187 /uhttpd.h
parentb7c85a2819b3869279a669d5681f574824589c6c (diff)
use pipes instead of a socketpair, EOF handling is broken with sockets
Diffstat (limited to 'uhttpd.h')
-rw-r--r--uhttpd.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/uhttpd.h b/uhttpd.h
index 3cd040d..a9777e8 100644
--- a/uhttpd.h
+++ b/uhttpd.h
@@ -130,6 +130,14 @@ struct relay {
void (*close)(struct relay *r, int ret);
};
+struct dispatch_proc {
+ struct blob_buf hdr;
+ struct uloop_fd wrfd;
+ struct relay r;
+ int status_code;
+ char *status_msg;
+};
+
struct dispatch_handler {
struct list_head list;
@@ -139,7 +147,7 @@ struct dispatch_handler {
};
struct dispatch {
- void (*data_send)(struct client *cl, const char *data, int len);
+ int (*data_send)(struct client *cl, const char *data, int len);
void (*data_done)(struct client *cl);
void (*write_cb)(struct client *cl);
void (*close_fds)(struct client *cl);
@@ -151,12 +159,7 @@ struct dispatch {
struct blob_attr **hdr;
int fd;
} file;
- struct {
- struct blob_buf hdr;
- struct relay r;
- int status_code;
- char *status_msg;
- } proc;
+ struct dispatch_proc proc;
};
};
@@ -227,6 +230,6 @@ void uh_relay_free(struct relay *r);
struct env_var *uh_get_process_vars(struct client *cl, struct path_info *pi);
bool uh_create_process(struct client *cl, struct path_info *pi,
- void (*cb)(struct client *cl, struct path_info *pi, int fd));
+ void (*cb)(struct client *cl, struct path_info *pi));
#endif