diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-04 20:13:03 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-04 20:13:03 +0000 |
commit | b20e2a5a26d3c9bbbea0dbea71227085bb8a135a (patch) | |
tree | d37a43a33c528c0c8240263a2ad0d0ce50e4bc55 /nuttx/fs | |
parent | 77a8ce12ae20be575adaf975d881da56f4b3b6dc (diff) | |
download | px4-nuttx-b20e2a5a26d3c9bbbea0dbea71227085bb8a135a.tar.gz px4-nuttx-b20e2a5a26d3c9bbbea0dbea71227085bb8a135a.tar.bz2 px4-nuttx-b20e2a5a26d3c9bbbea0dbea71227085bb8a135a.zip |
Fix more FTP bugs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3668 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r-- | nuttx/fs/fs_fdopen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nuttx/fs/fs_fdopen.c b/nuttx/fs/fs_fdopen.c index 329e4dd84..176ba1bf4 100644 --- a/nuttx/fs/fs_fdopen.c +++ b/nuttx/fs/fs_fdopen.c @@ -159,12 +159,12 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb) */ #if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 - ret = net_checksd; + ret = net_checksd(tcb, fd, oflags); #else /* No networking... it is just a bad descriptor */ err = EBADF; - return ERROR; + goto errout; #endif } @@ -244,6 +244,10 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb) } } + /* No free stream available.. report ENFILE */ + + err = ENFILE; + #if CONFIG_STDIO_BUFFER_SIZE > 0 errout_with_sem: #endif |