net/iscsi: change close() to spdk_sock_close()
All TCP socket operations in iSCSI should go through functions defined in sock.c. Two close() calls did not, so they are fixed in this patch. Change-Id: Ia5a87fd4085eb5b7e6732dc7a505e19994669a7e Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/390568 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
7e3a11f98b
commit
5f1cf6cb1f
@ -63,7 +63,7 @@ spdk_iscsi_portal_accept(void *arg)
|
||||
sock = rc;
|
||||
rc = spdk_iscsi_conn_construct(portal, sock);
|
||||
if (rc < 0) {
|
||||
close(sock);
|
||||
spdk_sock_close(sock);
|
||||
SPDK_ERRLOG("spdk_iscsi_connection_construct() failed\n");
|
||||
break;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ spdk_iscsi_portal_close(struct spdk_iscsi_portal *p)
|
||||
SPDK_DEBUGLOG(SPDK_TRACE_NET, "close portal (%s, %s)\n",
|
||||
p->host, p->port);
|
||||
spdk_iscsi_acceptor_stop(p);
|
||||
close(p->sock);
|
||||
spdk_sock_close(p->sock);
|
||||
p->sock = -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user