Skip to content
Commit 01ae35b5 authored by Andy Ross's avatar Andy Ross Committed by Jukka Rissanen
Browse files

net: tcp: Pass correct user_data pointers



The TCP stack inherited msot of the user_data management from UDP, but
it doesn't quite work.  It's not possible to have a single pointer in
the general case, as e.g. a net_context_send() call may happen
synchronously underneath a recv callback and clobber the pointer, even
though there will be much more data coming later on the active stream.

Put a recv_user_data field into the TCP struct and use that.  Long
term, it would be good to revisit this and come up with a unified
solution that works for both.  There is yet another "user_data"
pointer in net_connection that seem likely to overlap too.

Change-Id: Id3a8eca64fc680e0e80b74944c4d621d7810a8fe
Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent c78c7ac1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment