summaryrefslogtreecommitdiff
path: root/components/net/sal_socket/impl
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/sal_socket/impl')
-rw-r--r--components/net/sal_socket/impl/af_inet.h2
-rw-r--r--components/net/sal_socket/impl/af_inet_at.c4
-rw-r--r--components/net/sal_socket/impl/af_inet_lwip.c8
-rw-r--r--components/net/sal_socket/impl/proto_mbedtls.c22
4 files changed, 18 insertions, 18 deletions
diff --git a/components/net/sal_socket/impl/af_inet.h b/components/net/sal_socket/impl/af_inet.h
index caffbe1400..421d15bfae 100644
--- a/components/net/sal_socket/impl/af_inet.h
+++ b/components/net/sal_socket/impl/af_inet.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/net/sal_socket/impl/af_inet_at.c b/components/net/sal_socket/impl/af_inet_at.c
index 135e4183c4..c85dfe9f06 100644
--- a/components/net/sal_socket/impl/af_inet_at.c
+++ b/components/net/sal_socket/impl/af_inet_at.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -85,7 +85,7 @@ static const struct sal_socket_ops at_socket_ops =
#endif /* SAL_USING_POSIX */
};
-static const struct sal_netdb_ops at_netdb_ops =
+static const struct sal_netdb_ops at_netdb_ops =
{
at_gethostbyname,
NULL,
diff --git a/components/net/sal_socket/impl/af_inet_lwip.c b/components/net/sal_socket/impl/af_inet_lwip.c
index 56df735ab9..2e19275b5d 100644
--- a/components/net/sal_socket/impl/af_inet_lwip.c
+++ b/components/net/sal_socket/impl/af_inet_lwip.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -229,7 +229,7 @@ int inet_ioctlsocket(int socket, long cmd, void *arg)
{
case F_GETFL:
case F_SETFL:
- return lwip_fcntl(socket, cmd, (int) arg);
+ return lwip_fcntl(socket, cmd, (int) arg);
default:
return lwip_ioctl(socket, cmd, arg);
@@ -320,7 +320,7 @@ static const struct sal_proto_family lwip_inet_family =
AF_INET6,
#else
AF_INET,
-#endif
+#endif
&lwip_socket_ops,
&lwip_netdb_ops,
};
@@ -329,7 +329,7 @@ static const struct sal_proto_family lwip_inet_family =
int sal_lwip_netdev_set_pf_info(struct netdev *netdev)
{
RT_ASSERT(netdev);
-
+
netdev->sal_user_data = (void *) &lwip_inet_family;
return 0;
}
diff --git a/components/net/sal_socket/impl/proto_mbedtls.c b/components/net/sal_socket/impl/proto_mbedtls.c
index 3472bbeaf5..79fbdcc5d4 100644
--- a/components/net/sal_socket/impl/proto_mbedtls.c
+++ b/components/net/sal_socket/impl/proto_mbedtls.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -59,7 +59,7 @@ static void *mebdtls_socket(int socket)
{
tls_free(session);
session = RT_NULL;
-
+
return RT_NULL;
}
@@ -68,7 +68,7 @@ static void *mebdtls_socket(int socket)
{
mbedtls_client_close(session);
return RT_NULL;
- }
+ }
session->server_fd.fd = socket;
return (void *)session;
@@ -89,7 +89,7 @@ int mbedtls_net_send_cb(void *ctx, const unsigned char *buf, size_t len)
{
return -1;
}
-
+
pf = (struct sal_proto_family *)sock->netdev->sal_user_data;
/* Register scoket sendto option to TLS send data callback */
@@ -128,7 +128,7 @@ int mbedtls_net_recv_cb( void *ctx, unsigned char *buf, size_t len)
}
pf = (struct sal_proto_family *)sock->netdev->sal_user_data;
-
+
/* Register scoket recvfrom option to TLS recv data callback */
ret = pf->skt_ops->recvfrom((int) sock->user_data, (void *)buf, len, 0, RT_NULL, RT_NULL);
if (ret < 0)
@@ -183,7 +183,7 @@ static int mbedtls_connect(void *sock)
mbedtls_x509_crt_verify_info((char *)session->buffer, session->buffer_len, " ! ", ret);
goto __exit;
}
-
+
return ret;
__exit:
@@ -199,27 +199,27 @@ static int mbedtls_closesocket(void *sock)
{
struct sal_socket *ssock;
int socket;
-
+
if (sock == RT_NULL)
{
return 0;
}
-
+
socket = ((MbedTLSSession *) sock)->server_fd.fd;
ssock = sal_get_socket(socket);
if (ssock == RT_NULL)
{
return -1;
}
-
+
/* Close TLS client session, and clean user-data in SAL socket */
mbedtls_client_close((MbedTLSSession *) sock);
ssock->user_data_tls = RT_NULL;
-
+
return 0;
}
-static const struct sal_proto_tls_ops mbedtls_proto_ops=
+static const struct sal_proto_tls_ops mbedtls_proto_ops=
{
RT_NULL,
mebdtls_socket,