Skip to content

Commit

Permalink
stm32/modnwwiznet5k: Get the IP address of an established socket.
Browse files Browse the repository at this point in the history
When wiznet5k_socket_accept is called, if a socket is established, get the
IP address of the socket.
  • Loading branch information
Li-Weiwei authored and dpgeorge committed Oct 5, 2017
1 parent ff93fd4 commit 8c7db42
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ports/stm32/modnwwiznet5k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (sr == SOCK_ESTABLISHED) {
socket2->u_param = socket->u_param;
// TODO need to populate this with the correct values
ip[0] = 0;
ip[1] = 0;
ip[2] = 0;
ip[3] = 0;
getSn_DIPR((uint8_t)socket2->u_param.fileno, ip);
*port = getSn_PORT(socket2->u_param.fileno);

// WIZnet turns the listening socket into the client socket, so we
Expand Down

0 comments on commit 8c7db42

Please sign in to comment.