iscsi: Use not C++ style comments // but C-style comments /* */
Change-Id: Ia81209e1dd7c0892bb14ae8b2a5850130fcbf199 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/431078 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
d3fa0181e3
commit
472b2cfcf8
@ -263,7 +263,7 @@ spdk_iscsi_conn_construct(struct spdk_iscsi_portal *portal,
|
|||||||
conn->data_out_cnt = 0;
|
conn->data_out_cnt = 0;
|
||||||
conn->data_in_cnt = 0;
|
conn->data_in_cnt = 0;
|
||||||
pthread_mutex_unlock(&g_spdk_iscsi.mutex);
|
pthread_mutex_unlock(&g_spdk_iscsi.mutex);
|
||||||
conn->MaxRecvDataSegmentLength = 8192; // RFC3720(12.12)
|
conn->MaxRecvDataSegmentLength = 8192; /* RFC3720(12.12) */
|
||||||
|
|
||||||
conn->portal = portal;
|
conn->portal = portal;
|
||||||
conn->pg_tag = portal->group->tag;
|
conn->pg_tag = portal->group->tag;
|
||||||
|
@ -76,4 +76,4 @@ void spdk_iscsi_init_grps_destroy(void);
|
|||||||
void spdk_iscsi_init_grps_config_text(FILE *fp);
|
void spdk_iscsi_init_grps_config_text(FILE *fp);
|
||||||
void spdk_iscsi_init_grps_info_json(struct spdk_json_write_ctx *w);
|
void spdk_iscsi_init_grps_info_json(struct spdk_json_write_ctx *w);
|
||||||
void spdk_iscsi_init_grps_config_json(struct spdk_json_write_ctx *w);
|
void spdk_iscsi_init_grps_config_json(struct spdk_json_write_ctx *w);
|
||||||
#endif // SPDK_INIT_GRP_H
|
#endif /* SPDK_INIT_GRP_H */
|
||||||
|
@ -80,7 +80,7 @@ static void spdk_gen_random(uint8_t *buf, size_t len);
|
|||||||
static void srandomdev(void);
|
static void srandomdev(void);
|
||||||
#endif /* HAVE_SRANDOMDEV */
|
#endif /* HAVE_SRANDOMDEV */
|
||||||
#ifndef HAVE_ARC4RANDOM
|
#ifndef HAVE_ARC4RANDOM
|
||||||
//static uint32_t arc4random(void);
|
/* static uint32_t arc4random(void); */
|
||||||
#endif /* HAVE_ARC4RANDOM */
|
#endif /* HAVE_ARC4RANDOM */
|
||||||
|
|
||||||
/* convert from/to bin/hex */
|
/* convert from/to bin/hex */
|
||||||
@ -815,12 +815,12 @@ spdk_iscsi_auth_params(struct spdk_iscsi_conn *conn,
|
|||||||
|
|
||||||
rc = spdk_iscsi_get_authinfo(conn, val);
|
rc = spdk_iscsi_get_authinfo(conn, val);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
//SPDK_ERRLOG("auth user or secret is missing\n");
|
/* SPDK_ERRLOG("auth user or secret is missing\n"); */
|
||||||
SPDK_ERRLOG("iscsi_get_authinfo() failed\n");
|
SPDK_ERRLOG("iscsi_get_authinfo() failed\n");
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
if (conn->auth.user[0] == '\0' || conn->auth.secret[0] == '\0') {
|
if (conn->auth.user[0] == '\0' || conn->auth.secret[0] == '\0') {
|
||||||
//SPDK_ERRLOG("auth user or secret is missing\n");
|
/* SPDK_ERRLOG("auth user or secret is missing\n"); */
|
||||||
SPDK_ERRLOG("auth failed (user %.64s)\n", user);
|
SPDK_ERRLOG("auth failed (user %.64s)\n", user);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
@ -849,7 +849,7 @@ spdk_iscsi_auth_params(struct spdk_iscsi_conn *conn,
|
|||||||
/* compare MD5 digest */
|
/* compare MD5 digest */
|
||||||
if (memcmp(tgtmd5, resmd5, SPDK_MD5DIGEST_LEN) != 0) {
|
if (memcmp(tgtmd5, resmd5, SPDK_MD5DIGEST_LEN) != 0) {
|
||||||
/* not match */
|
/* not match */
|
||||||
//SPDK_ERRLOG("auth user or secret is missing\n");
|
/* SPDK_ERRLOG("auth user or secret is missing\n"); */
|
||||||
SPDK_ERRLOG("auth failed (user %.64s)\n", user);
|
SPDK_ERRLOG("auth failed (user %.64s)\n", user);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
@ -880,7 +880,7 @@ spdk_iscsi_auth_params(struct spdk_iscsi_conn *conn,
|
|||||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "got CHAP_I/CHAP_C\n");
|
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "got CHAP_I/CHAP_C\n");
|
||||||
|
|
||||||
if (conn->auth.muser[0] == '\0' || conn->auth.msecret[0] == '\0') {
|
if (conn->auth.muser[0] == '\0' || conn->auth.msecret[0] == '\0') {
|
||||||
//SPDK_ERRLOG("mutual auth user or secret is missing\n");
|
/* SPDK_ERRLOG("mutual auth user or secret is missing\n"); */
|
||||||
SPDK_ERRLOG("auth failed (user %.64s)\n", user);
|
SPDK_ERRLOG("auth failed (user %.64s)\n", user);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
@ -2364,7 +2364,8 @@ spdk_iscsi_op_logout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (conn->id == cid) {
|
if (conn->id == cid) {
|
||||||
response = 0; // connection or session closed successfully
|
/* connection or session closed successfully */
|
||||||
|
response = 0;
|
||||||
spdk_iscsi_conn_logout(conn);
|
spdk_iscsi_conn_logout(conn);
|
||||||
} else {
|
} else {
|
||||||
response = 1;
|
response = 1;
|
||||||
|
@ -80,4 +80,4 @@ void spdk_iscsi_portal_grp_close_all(void);
|
|||||||
void spdk_iscsi_portal_grps_config_text(FILE *fp);
|
void spdk_iscsi_portal_grps_config_text(FILE *fp);
|
||||||
void spdk_iscsi_portal_grps_info_json(struct spdk_json_write_ctx *w);
|
void spdk_iscsi_portal_grps_info_json(struct spdk_json_write_ctx *w);
|
||||||
void spdk_iscsi_portal_grps_config_json(struct spdk_json_write_ctx *w);
|
void spdk_iscsi_portal_grps_config_json(struct spdk_json_write_ctx *w);
|
||||||
#endif // SPDK_PORTAL_GRP_H
|
#endif /* SPDK_PORTAL_GRP_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user