Merge pull request #4225 from DavidLin1577/patch-2

Update net_test.c
This commit is contained in:
Bernard Xiong 2021-01-05 22:17:32 +08:00 committed by GitHub
commit 89a1f64f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ void tcpecho_socket_entry(void *parameter)
server_addr.sin_family = AF_INET; server_addr.sin_family = AF_INET;
server_addr.sin_port = htons(TCP_SOCKET_ECHO_PORT); server_addr.sin_port = htons(TCP_SOCKET_ECHO_PORT);
server_addr.sin_addr.s_addr = INADDR_ANY; server_addr.sin_addr.s_addr = INADDR_ANY;
rt_memset(&(server_addr.sin_zero),8, sizeof(server_addr.sin_zero)); rt_memset(&(server_addr.sin_zero),0, sizeof(server_addr.sin_zero));
/* bind to server address */ /* bind to server address */
if (bind(sock, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1) if (bind(sock, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1)