aboutsummaryrefslogtreecommitdiff
path: root/apps/examples/ftpd
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-02-18 18:13:30 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-02-18 18:13:30 +0000
commitf04310d55941bf5e4db3a71a5d3eaca6a6f89616 (patch)
treeca4c58d32d12949e8d08cb69a652b5e3f7fd0e58 /apps/examples/ftpd
parentf60d578a461ee991f5eb42f9ae0dd2e7def75f75 (diff)
downloadpx4-firmware-f04310d55941bf5e4db3a71a5d3eaca6a6f89616.tar.gz
px4-firmware-f04310d55941bf5e4db3a71a5d3eaca6a6f89616.tar.bz2
px4-firmware-f04310d55941bf5e4db3a71a5d3eaca6a6f89616.zip
Correct and error in recv() and recvfrom() return value
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4402 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'apps/examples/ftpd')
-rwxr-xr-xapps/examples/ftpd/ftpd_main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/examples/ftpd/ftpd_main.c b/apps/examples/ftpd/ftpd_main.c
index d4808a4aa..fbabf64de 100755
--- a/apps/examples/ftpd/ftpd_main.c
+++ b/apps/examples/ftpd/ftpd_main.c
@@ -188,7 +188,15 @@ int ftpd_daemon(int s_argc, char **s_argv)
*/
ret = ftpd_session(handle, 5000);
- printf("FTP daemon [%d] ftpd_session returned %d\n", g_ftpdglob.pid, ret);
+
+ /* If any interesting happened (i.e., any thing other than a timeout),
+ * then report the interesting event.
+ */
+
+ if (ret != -ETIMEDOUT)
+ {
+ printf("FTP daemon [%d] ftpd_session returned %d\n", g_ftpdglob.pid, ret);
+ }
}
/* Close the FTPD server and exit (we can get here only if