Skip to content
Snippets Groups Projects
Commit 8c7db42e authored by Li Weiwei's avatar Li Weiwei Committed by Damien George
Browse files

stm32/modnwwiznet5k: Get the IP address of an established socket.

When wiznet5k_socket_accept is called, if a socket is established, get the
IP address of the socket.
parent ff93fd4f
No related branches found
No related tags found
No related merge requests found
...@@ -173,11 +173,7 @@ STATIC int wiznet5k_socket_accept(mod_network_socket_obj_t *socket, mod_network_ ...@@ -173,11 +173,7 @@ STATIC int wiznet5k_socket_accept(mod_network_socket_obj_t *socket, mod_network_
int sr = getSn_SR((uint8_t)socket->u_param.fileno); int sr = getSn_SR((uint8_t)socket->u_param.fileno);
if (sr == SOCK_ESTABLISHED) { if (sr == SOCK_ESTABLISHED) {
socket2->u_param = socket->u_param; socket2->u_param = socket->u_param;
// TODO need to populate this with the correct values getSn_DIPR((uint8_t)socket2->u_param.fileno, ip);
ip[0] = 0;
ip[1] = 0;
ip[2] = 0;
ip[3] = 0;
*port = getSn_PORT(socket2->u_param.fileno); *port = getSn_PORT(socket2->u_param.fileno);
// WIZnet turns the listening socket into the client socket, so we // WIZnet turns the listening socket into the client socket, so we
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment