From b1ba6835d554382c77a216a3f2eb3fa7ded96535 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 24 Nov 2007 13:02:03 +0000 Subject: Must disconnect TCP socket on close() git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@405 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/net/sendto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nuttx/net/sendto.c') diff --git a/nuttx/net/sendto.c b/nuttx/net/sendto.c index ba9bac0af..a0f3cc4a1 100644 --- a/nuttx/net/sendto.c +++ b/nuttx/net/sendto.c @@ -196,18 +196,18 @@ ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) { FAR struct socket *psock; +#ifdef CONFIG_NET_UDP #ifdef CONFIG_NET_IPv6 FAR const struct sockaddr_in6 *into = (const struct sockaddr_in6 *)to; #else FAR const struct sockaddr_in *into = (const struct sockaddr_in *)to; #endif -#ifdef CONFIG_NET_UDP struct uip_udp_conn *udp_conn; struct sendto_s state; irqstate_t save; + int ret; #endif int err; - int ret; /* If to is NULL or tolen is zero, then this function is same as send (for * connected socket types) -- cgit v1.2.3