mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
Workaround (leftover?) events after disable iSNS server
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4472 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -971,6 +971,14 @@ static int scn_accept_connection(void)
|
||||
socklen_t slen;
|
||||
int fd, err, opt = 1;
|
||||
|
||||
if (isns_server == NULL) {
|
||||
/*
|
||||
* Sometimes we have (leftover?) events after disable iSNS
|
||||
* server, so ignore them
|
||||
*/
|
||||
goto out;
|
||||
}
|
||||
|
||||
slen = sizeof(from);
|
||||
fd = accept(scn_listen_fd, &from.sa, &slen);
|
||||
if (fd < 0) {
|
||||
@@ -989,6 +997,7 @@ static int scn_accept_connection(void)
|
||||
scn_fd = fd;
|
||||
isns_set_fd(isns_fd, scn_listen_fd, scn_fd);
|
||||
|
||||
out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user