diff --git a/net/socket/accept.c b/net/socket/accept.c index 46622d318ef..1a4dbd04c0d 100644 --- a/net/socket/accept.c +++ b/net/socket/accept.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/socket/accept.c * - * Copyright (C) 2007-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -489,6 +489,7 @@ int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) * interrupt handler). */ + pnewsock->s_domain = psock->s_domain; pnewsock->s_type = SOCK_STREAM; pnewsock->s_conn = state.acpt_newconn; pnewsock->s_flags |= _SF_CONNECTED; diff --git a/net/socket/net_clone.c b/net/socket/net_clone.c index 1ecd50ebad7..5d46f45ead3 100644 --- a/net/socket/net_clone.c +++ b/net/socket/net_clone.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/socket/net_clone.c * - * Copyright (C) 2009, 2011-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -75,6 +75,7 @@ int net_clone(FAR struct socket *psock1, FAR struct socket *psock2) /* Duplicate the socket state */ + psock2->s_domain = psock1->s_domain; /* IP domain: PF_INET, PF_INET6, or PF_PACKET */ psock2->s_type = psock1->s_type; /* Protocol type: Only SOCK_STREAM or SOCK_DGRAM */ psock2->s_flags = psock1->s_flags; /* See _SF_* definitions */ #ifdef CONFIG_NET_SOCKOPTS diff --git a/net/socket/recvfrom.c b/net/socket/recvfrom.c index 7fe2483956a..fe194ac864c 100644 --- a/net/socket/recvfrom.c +++ b/net/socket/recvfrom.c @@ -211,7 +211,7 @@ static void recvfrom_newpktdata(FAR struct net_driver_s *dev, * Copy the read data from the packet * * Parameters: - * dev The sructure of the network driver that caused the interrupt + * dev The structure of the network driver that caused the interrupt * pstate recvfrom state structure * * Returned Value: