iscsi: retrieve global login timeout from sysctlbyname() as integer
The OID "kern.iscsi.login_timeout" references an integer and not a string. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D34380
This commit is contained in:
parent
2ff07d9220
commit
407c34e735
@ -397,12 +397,14 @@ connection_new(int iscsi_fd, const struct iscsi_daemon_request *request)
|
|||||||
keepinit);
|
keepinit);
|
||||||
}
|
}
|
||||||
if (conn->conn_conf.isc_login_timeout == -1) {
|
if (conn->conn_conf.isc_login_timeout == -1) {
|
||||||
char value[8];
|
int value;
|
||||||
size_t size = sizeof(value);
|
size_t size = sizeof(value);
|
||||||
sysctlbyname("kern.iscsi.login_timeout", &value, &size,
|
if (sysctlbyname("kern.iscsi.login_timeout",
|
||||||
NULL, 0);
|
&value, &size, NULL, 0) == 0) {
|
||||||
keepinit = strtol(value, NULL, 10);
|
keepinit = value;
|
||||||
log_debugx("global login_timeout at %d sec", keepinit);
|
log_debugx("global login_timeout at %d sec",
|
||||||
|
keepinit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (keepinit > 0) {
|
if (keepinit > 0) {
|
||||||
if (setsockopt(conn->conn.conn_socket,
|
if (setsockopt(conn->conn.conn_socket,
|
||||||
|
Loading…
Reference in New Issue
Block a user