Skip to content

Commit

Permalink
net: shell: Print connection information properly for AF_CAN
Browse files Browse the repository at this point in the history
CANBUS socket information was just printing unknown information.

Signed-off-by: Jukka Rissanen <[email protected]>
  • Loading branch information
jukkar committed Jun 18, 2019
1 parent 0032f68 commit 1e98928
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions subsys/net/ip/net_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,11 @@ static void conn_handler_cb(struct net_conn *conn, void *user_data)
&net_sin(&conn->remote_addr)->sin_addr),
ntohs(net_sin(&conn->remote_addr)->sin_port));
} else
#endif
#ifdef CONFIG_NET_L2_CANBUS
if (conn->local_addr.sa_family == AF_CAN) {
snprintk(addr_local, sizeof(addr_local), "-");
} else
#endif
if (conn->local_addr.sa_family == AF_UNSPEC) {
snprintk(addr_local, sizeof(addr_local), "AF_UNSPEC");
Expand Down

0 comments on commit 1e98928

Please sign in to comment.