diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-04-23 21:07:03 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-04-23 21:07:03 +0000 |
commit | 01de46fb3fce89561f6b9715593fa240c071df08 (patch) | |
tree | a3c44d493a4e7d67d19c31e6d16c25beae25441d /apps | |
parent | d045038299f9182ec38a67644df21b3150291f91 (diff) | |
download | px4-firmware-01de46fb3fce89561f6b9715593fa240c071df08.tar.gz px4-firmware-01de46fb3fce89561f6b9715593fa240c071df08.tar.bz2 px4-firmware-01de46fb3fce89561f6b9715593fa240c071df08.zip |
NFS fixes
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4649 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'apps')
-rw-r--r-- | apps/nshlib/nsh_fscmds.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/nshlib/nsh_fscmds.c b/apps/nshlib/nsh_fscmds.c index b1a0963cf..d79ce4f47 100644 --- a/apps/nshlib/nsh_fscmds.c +++ b/apps/nshlib/nsh_fscmds.c @@ -1223,7 +1223,7 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) FAR char *address; FAR char *target; FAR char *protocol = NULL; - struct sockaddr_in *sin = NULL; + struct sockaddr_in sin; bool badarg = false; #ifdef CONFIG_NET_IPv6 struct in6_addr inaddr; @@ -1341,10 +1341,11 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) data.version = 3; data.proto = (tcp) ? 6 : 17; data.sotype = (tcp) ? 0 : 1; - sin->sin_family = 2; - sin->sin_port = htons(2049); - sin->sin_addr = inaddr; - data.addr = (struct sockaddr *)sin; + sin.sin_family = 2; + sin.sin_port = htons(2049); + sin.sin_addr = inaddr; + data.addr = (struct sockaddr *)&sin; + data.addrlen = sizeof(struct sockaddr); data.flags = 0x00000200; data.retrans = 3; data.acregmin = 3; |