projects
/
project
/
uhttpd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make uh_path_lookup static
[project/uhttpd.git]
/
client.c
diff --git
a/client.c
b/client.c
index
e1c8c55
..
a28067e
100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-63,6
+63,7
@@
static void uh_dispatch_done(struct client *cl)
if (cl->dispatch_free)
cl->dispatch_free(cl);
cl->dispatch_free = NULL;
if (cl->dispatch_free)
cl->dispatch_free(cl);
cl->dispatch_free = NULL;
+ cl->dispatch_close_fds = NULL;
}
void uh_request_done(struct client *cl)
}
void uh_request_done(struct client *cl)
@@
-329,3
+330,16
@@
void uh_accept_client(int fd)
n_clients++;
cl->id = client_id++;
}
n_clients++;
cl->id = client_id++;
}
+
+void uh_close_fds(void)
+{
+ struct client *cl;
+
+ uloop_done();
+ uh_close_listen_fds();
+ list_for_each_entry(cl, &clients, list) {
+ close(cl->sfd.fd.fd);
+ if (cl->dispatch_close_fds)
+ cl->dispatch_close_fds(cl);
+ }
+}