diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-23 11:00:22 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-23 11:00:22 -0600 |
commit | 6796a8dde653598dec5c234bf68b2b3bd246a099 (patch) | |
tree | 6377c22fd0583404c4411a1bc71640bdfbc754cb /nuttx/net/tcp | |
parent | 2d0aca092dfe254563e9cc148fb1eed82522d74c (diff) | |
download | px4-nuttx-6796a8dde653598dec5c234bf68b2b3bd246a099.tar.gz px4-nuttx-6796a8dde653598dec5c234bf68b2b3bd246a099.tar.bz2 px4-nuttx-6796a8dde653598dec5c234bf68b2b3bd246a099.zip |
Add logic to netdev_findbyaddr() to return the correct network device for the case where a broadcast address is used. This change caused trivial ripples through other files because additional parameters are required for netdev_findbyaddr() when CONFIG_NET_MULTINIC
Diffstat (limited to 'nuttx/net/tcp')
-rw-r--r-- | nuttx/net/tcp/tcp_send_buffered.c | 4 | ||||
-rw-r--r-- | nuttx/net/tcp/tcp_send_unbuffered.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/nuttx/net/tcp/tcp_send_buffered.c b/nuttx/net/tcp/tcp_send_buffered.c index d516262fa..c50b81040 100644 --- a/nuttx/net/tcp/tcp_send_buffered.c +++ b/nuttx/net/tcp/tcp_send_buffered.c @@ -824,7 +824,11 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, /* Notify the device driver of the availability of TX data */ +#ifdef CONFIG_NET_MULTILINK + netdev_txnotify(conn->lipaddr, conn->ripaddr); +#else netdev_txnotify(conn->ripaddr); +#endif result = len; } diff --git a/nuttx/net/tcp/tcp_send_unbuffered.c b/nuttx/net/tcp/tcp_send_unbuffered.c index 3590024ec..9aa6cdb5a 100644 --- a/nuttx/net/tcp/tcp_send_unbuffered.c +++ b/nuttx/net/tcp/tcp_send_unbuffered.c @@ -596,7 +596,11 @@ ssize_t psock_tcp_send(FAR struct socket *psock, /* Notify the device driver of the availability of TX data */ +#ifdef CONFIG_NET_MULTILINK + netdev_txnotify(conn->lipaddr, conn->ripaddr); +#else netdev_txnotify(conn->ripaddr); +#endif /* Wait for the send to complete or an error to occur: NOTES: (1) * net_lockedwait will also terminate if a signal is received, (2) interrupts |