diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-08-08 15:14:10 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-08-08 15:14:10 +0000 |
commit | 709de07c24959d66bff6a68bce320bc6a5f1244c (patch) | |
tree | aeac4a43b2b2b9e3295db83025e15ee9b9a48bf5 /nuttx/netutils/thttpd/fdwatch.c | |
parent | 0f44115d023b06ca7bcfaa63fd14e3c8b852ad45 (diff) | |
download | nuttx-709de07c24959d66bff6a68bce320bc6a5f1244c.tar.gz nuttx-709de07c24959d66bff6a68bce320bc6a5f1244c.tar.bz2 nuttx-709de07c24959d66bff6a68bce320bc6a5f1244c.zip |
strftime fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2014 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/thttpd/fdwatch.c')
-rw-r--r-- | nuttx/netutils/thttpd/fdwatch.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/netutils/thttpd/fdwatch.c b/nuttx/netutils/thttpd/fdwatch.c index 45673e3f4..a402b8f71 100644 --- a/nuttx/netutils/thttpd/fdwatch.c +++ b/nuttx/netutils/thttpd/fdwatch.c @@ -177,7 +177,7 @@ void fdwatch_uninitialize(struct fdwatch_s *fw) void fdwatch_add_fd(struct fdwatch_s *fw, int fd, void *client_data, int rw) { - nvdbg("fd: %d\n", fd); + nvdbg("fd: %d client_data: %p\n", fd, client_data); #ifdef CONFIG_DEBUG if (fd < CONFIG_NFILE_DESCRIPTORS || @@ -347,11 +347,13 @@ int fdwatch_check_fd(struct fdwatch_s *fw, int fd) void *fdwatch_get_next_client_data(struct fdwatch_s *fw) { - if (fw->next >= fw->nfds) + if (fw->next >= fw->nwatched) { - ndbg("All client data returned: %d\n", fw->next); - return NULL; + nvdbg("All client data returned: %d\n", fw->next); + return (void*)-1; } + + nvdbg("client_data[%d]: %p\n", fw->next, fw->client[fw->next].data); return fw->client[fw->next++].data; } |