strftime fixes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2014 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2009-08-08 15:14:10 +00:00
parent 32716fbc25
commit f7483ab7b1
3 changed files with 22 additions and 11 deletions
+6 -4
View File
@@ -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;
}
+1 -1
View File
@@ -372,10 +372,10 @@ static void add_response(httpd_conn *hc, char *str)
len = strlen(str);
resplen = hc->buflen + len;
DEBUGASSERT(resplen < CONFIG_THTTPD_IOBUFFERSIZE);
if (resplen > CONFIG_THTTPD_IOBUFFERSIZE)
{
ndbg("resplen(%d) > buffer size(%d)\n", resplen, CONFIG_THTTPD_IOBUFFERSIZE);
resplen = CONFIG_THTTPD_IOBUFFERSIZE;
len = resplen - hc->buflen;
}