You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/03 08:07:53 UTC

[incubator-nuttx-apps] branch master updated: netutils/ftpc: ftpc_connect: Fixed invalid socket close.

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b074bc  netutils/ftpc: ftpc_connect: Fixed invalid socket close.
7b074bc is described below

commit 7b074bcf66ead6188569d15b32db22b1e41bbaa8
Author: Atsunori Saito <sa...@yedo.com>
AuthorDate: Sat Jul 3 12:03:47 2021 +0900

    netutils/ftpc: ftpc_connect: Fixed invalid socket close.
---
 netutils/ftpc/ftpc_connect.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/netutils/ftpc/ftpc_connect.c b/netutils/ftpc/ftpc_connect.c
index 8ffee33..1fae79e 100644
--- a/netutils/ftpc/ftpc_connect.c
+++ b/netutils/ftpc/ftpc_connect.c
@@ -73,6 +73,10 @@ SESSION ftpc_connect(FAR union ftpc_sockaddr_u *server)
   session->conntimeo   = CONFIG_FTP_DEFTIMEO * CLOCKS_PER_SEC;
   session->pid         = getpid();
 
+  session->cmd.sd       = -1;
+  session->data.sd      = -1;
+  session->dacceptor.sd = -1;
+
   /* Use the default port if the user specified port number zero */
 
 #ifdef CONFIG_NET_IPv6