summaryrefslogtreecommitdiff
path: root/apps/netutils
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-03 18:42:33 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-03 18:42:33 +0000
commitc5ec7c478098273586b7a5716e30dc82c1e6aba5 (patch)
tree241ec95305382eac68e212764452ee17655df48f /apps/netutils
parentcfc7fe371ad9efc22bded77dc0779ec4eff1a9fd (diff)
downloadnuttx-c5ec7c478098273586b7a5716e30dc82c1e6aba5.tar.gz
nuttx-c5ec7c478098273586b7a5716e30dc82c1e6aba5.tar.bz2
nuttx-c5ec7c478098273586b7a5716e30dc82c1e6aba5.zip
Pass __KERNEL__ define (or not) to all makes to handle small differences in user-/kernel-builds
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3459 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/netutils')
-rw-r--r--apps/netutils/tftpc/tftpc_get.c2
-rw-r--r--apps/netutils/tftpc/tftpc_put.c6
-rw-r--r--apps/netutils/webclient/webclient.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/netutils/tftpc/tftpc_get.c b/apps/netutils/tftpc/tftpc_get.c
index e0779d17d..f4fb74dd3 100644
--- a/apps/netutils/tftpc/tftpc_get.c
+++ b/apps/netutils/tftpc/tftpc_get.c
@@ -167,7 +167,7 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, bool binary)
if (!packet)
{
ndbg("packet memory allocation failure\n");
- errno = ENOMEM;
+ set_errno(ENOMEM);
goto errout;
}
diff --git a/apps/netutils/tftpc/tftpc_put.c b/apps/netutils/tftpc/tftpc_put.c
index 4d87ba908..c292244a6 100644
--- a/apps/netutils/tftpc/tftpc_put.c
+++ b/apps/netutils/tftpc/tftpc_put.c
@@ -334,7 +334,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
if (!packet)
{
ndbg("packet memory allocation failure\n");
- errno = ENOMEM;
+ set_errno(ENOMEM);
goto errout;
}
@@ -388,7 +388,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
if (++retry > TFTP_RETRIES)
{
ndbg("Retry count exceeded\n");
- errno = ETIMEDOUT;
+ set_errno(ETIMEDOUT);
goto errout_with_sd;
}
}
@@ -455,7 +455,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
if (++retry > TFTP_RETRIES)
{
ndbg("Retry count exceeded\n");
- errno = ETIMEDOUT;
+ set_errno(ETIMEDOUT);
goto errout_with_sd;
}
}
diff --git a/apps/netutils/webclient/webclient.c b/apps/netutils/webclient/webclient.c
index 2c5108a4a..e52f592f5 100644
--- a/apps/netutils/webclient/webclient.c
+++ b/apps/netutils/webclient/webclient.c
@@ -431,7 +431,7 @@ int wget(FAR const char *url, FAR char *buffer, int buflen,
if (ret != 0)
{
ndbg("Malformed HTTP URL: %s\n", url);
- errno = -ret;
+ set_errno(-ret);
return ERROR;
}
nvdbg("hostname='%s' filename='%s'\n", ws.hostname, ws.filename);
@@ -576,7 +576,7 @@ int wget(FAR const char *url, FAR char *buffer, int buflen,
return OK;
errout_with_errno:
- errno = -ret;
+ set_errno(-ret);
errout:
close(sockfd);
return ERROR;