Correct some network lock logic: Two error conditions where the network was not being unlocked and one where it was getting unlocked twice. From Jussi Kivilinna.
This commit is contained in:
parent
04a409aba0
commit
2fcb93d2ca
|
@ -135,6 +135,8 @@ int inline local_stream_connect(FAR struct local_conn_s *client,
|
||||||
{
|
{
|
||||||
ndbg("ERROR: Failed to create FIFOs for %s: %d\n",
|
ndbg("ERROR: Failed to create FIFOs for %s: %d\n",
|
||||||
client->lc_path, ret);
|
client->lc_path, ret);
|
||||||
|
|
||||||
|
net_unlock(state);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,6 +149,8 @@ int inline local_stream_connect(FAR struct local_conn_s *client,
|
||||||
{
|
{
|
||||||
ndbg("ERROR: Failed to open write-only FIFOs for %s: %d\n",
|
ndbg("ERROR: Failed to open write-only FIFOs for %s: %d\n",
|
||||||
client->lc_path, ret);
|
client->lc_path, ret);
|
||||||
|
|
||||||
|
net_unlock(state);
|
||||||
goto errout_with_fifos;
|
goto errout_with_fifos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,8 +297,11 @@ int psock_local_connect(FAR struct socket *psock,
|
||||||
_SS_ISNONBLOCK(psock->s_flags),
|
_SS_ISNONBLOCK(psock->s_flags),
|
||||||
state);
|
state);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
net_unlock(state);
|
net_unlock(state);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue