Fixes to Coverity issues 77197 (mysql_common.c, dcb.c, mysql_client.c, skygw_debug.h), 72654 (poll.c), 72756 (mysql_backend.c), 72744 (mysql_backend.c), 77197 (mysql_common.c), 72746 (mysql_common.c), 72676 (mysql_common.c), 72705 (readwritesplit.c), 72697 (readwritesplit.c), 72652 (skygw_debug.h)

This commit is contained in:
VilhoRaatikka
2014-11-11 14:10:06 +02:00
parent 704c69eb40
commit 061fa62d29
7 changed files with 138 additions and 114 deletions

View File

@ -1064,9 +1064,9 @@ int gw_MySQLListener(
strerror(errno));
return 0;
}
#if defined(SS_DEBUG)
#if defined(FAKE_CODE)
conn_open[l_so] = true;
#endif
#endif /* FAKE_CODE */
listen_dcb->func.accept = gw_MySQLAccept;
return 1;
@ -1197,8 +1197,10 @@ int gw_MySQLAccept(DCB *listener)
"%lu [gw_MySQLAccept] Accepted fd %d.",
pthread_self(),
c_sock)));
#endif /* SS_DEBUG */
#if defined(FAKE_CODE)
conn_open[c_sock] = true;
#endif
#endif /* FAKE_CODE */
/* set nonblocking */
sendbuf = GW_CLIENT_SO_SNDBUF;
setsockopt(c_sock, SOL_SOCKET, SO_SNDBUF, &sendbuf, optlen);