summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-12-31 18:49:08 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-12-31 18:49:08 +0100
commit8515c92b9302b258be10df5c5cee240dd4b137f6 (patch)
tree81a74986f105cec6dc5306d1979af0860843a387 /client.c
parentd779a5dc390b9c6e1ed32cdd287997f81ee88d37 (diff)
make uh_path_lookup static
Diffstat (limited to 'client.c')
-rw-r--r--client.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/client.c b/client.c
index e1c8c55..a28067e 100644
--- 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;
+ cl->dispatch_close_fds = NULL;
}
void uh_request_done(struct client *cl)
@@ -329,3 +330,16 @@ void uh_accept_client(int fd)
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);
+ }
+}