net: sockets: fix conn_handler check in zsock_getsockname_ctx
The check was inverted, so a bound socket was detected as not bound. Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
This commit is contained in:
parent
cf72fe8fe9
commit
8ac2f96ca6
|
@ -1599,7 +1599,7 @@ int zsock_getsockname_ctx(struct net_context *ctx, struct sockaddr *addr,
|
|||
socklen_t newlen = 0;
|
||||
|
||||
/* If we don't have a connection handler, the socket is not bound */
|
||||
if (ctx->conn_handler) {
|
||||
if (!ctx->conn_handler) {
|
||||
SET_ERRNO(-EINVAL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue