Skip to content
Commit da5c7b68 authored by Paul Sokolovsky's avatar Paul Sokolovsky Committed by Anas Nashif
Browse files

net: context: Check if conn_handler exists when binding



If a UDP context had net_context_recv() called before
net_context_bind(), then it will have a stale connection handle
associated with initial (random) port number, while will be "bound"
to a new port as specified in net_context_bind(). So, it silently
won't behave as a user expects. net_context_bind() should really
update (or destroy/recreate) conn_handle in this case, but until
it's implemented, apply stopgap measure of at lease reporting error
back to user in this case.

Jira: ZEP-1644

Change-Id: I22ad55f94eaac487a4d5091ccbb24f973ec71553
Signed-off-by: default avatarPaul Sokolovsky <paul.sokolovsky@linaro.org>
(cherry picked from commit 1784ae185d6af9bc54d51dfe0d23214b06d84124)
parent 950b079b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment