Several webserver bugs fixed

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@391 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2007-11-20 20:32:33 +00:00
parent 26c91f4733
commit ea2ca7bfc3
21 changed files with 800 additions and 183 deletions
+18 -13
View File
@@ -1,5 +1,5 @@
/************************************************************
* fs_write.c
/****************************************************************************
* fs/fs_write.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -31,15 +31,15 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Compilation Switches
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -54,11 +54,11 @@
#include "fs_internal.h"
/************************************************************
* Global Functions
************************************************************/
/****************************************************************************
* Global Functions
****************************************************************************/
/********************************************************************************************
* Function: send
*
* Description:
@@ -106,15 +106,17 @@
*
* Assumptions:
*
****************************************************************************/
********************************************************************************************/
int write(int fd, const void *buf, unsigned int nbytes)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *list;
FAR struct file *this_file;
FAR struct inode *inode;
int err;
int ret;
#endif
int err;
/* Did we get a valid file descriptor? */
@@ -135,6 +137,8 @@ int write(int fd, const void *buf, unsigned int nbytes)
}
}
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Get the thread-specific file list */
list = sched_getfiles();
@@ -172,6 +176,7 @@ int write(int fd, const void *buf, unsigned int nbytes)
}
return ret;
#endif
errout:
*get_errno_ptr() = err;