Skip to content

Commit 4f4232c

Browse files
committed
Change from no-locking (false default) to enable_locking (true default)
1 parent 2f89ab0 commit 4f4232c

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

lib/tlog/rec.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ tlog_rec(struct tlog_errs **perrs, uid_t euid, gid_t egid,
11261126
clockid_t clock_id;
11271127
unsigned int session_id;
11281128
bool lock_acquired = false;
1129-
bool no_locking = false;
1129+
bool enable_locking = true;
11301130
struct json_object *obj;
11311131
int64_t num;
11321132
unsigned int latency;
@@ -1145,9 +1145,9 @@ tlog_rec(struct tlog_errs **perrs, uid_t euid, gid_t egid,
11451145
}
11461146
}
11471147

1148-
/* Check for the no-locking flag */
1149-
if (json_object_object_get_ex(conf, "no-locking", &obj)) {
1150-
no_locking = json_object_get_boolean(obj);
1148+
/* Check for the enable_locking flag */
1149+
if (json_object_object_get_ex(conf, "enable_locking", &obj)) {
1150+
enable_locking = json_object_get_boolean(obj);
11511151
}
11521152

11531153
/* Check for the version flag */
@@ -1204,7 +1204,7 @@ tlog_rec(struct tlog_errs **perrs, uid_t euid, gid_t egid,
12041204
TLOG_ERRS_RAISECS(grc, "Failed retrieving session ID");
12051205
}
12061206

1207-
if (opts & TLOG_REC_OPT_LOCK_SESS && !no_locking) {
1207+
if (opts & TLOG_REC_OPT_LOCK_SESS && enable_locking) {
12081208
/* Attempt to lock the session */
12091209
grc = tlog_session_lock(perrs, session_id, euid, egid, &lock_acquired);
12101210
if (grc != TLOG_RC_OK) {

m4/tlog/rec_session_conf_schema.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ M4_PARAM(`', `shell', `file-env',
3030
`SHELL is the ', `The ',
3131
`M4_LINES(`path to the shell executable which should be spawned.')')m4_dnl
3232
m4_dnl
33-
M4_PARAM(`', `no-locking', `file-env',
34-
`M4_TYPE_BOOL(false)', true,
35-
`n', `false', `Disable session locking',
33+
M4_PARAM(`', `enable_locking', `file-env',
34+
`M4_TYPE_BOOL(true)', true,
35+
`n', `true', `Enable locking by session ID',
3636
`If specified, ', `If true ',
37-
`M4_LINES(`locking by sessionid is disabled.')')m4_dnl
37+
`M4_LINES(`locking by session ID is enabled.')')m4_dnl
3838
m4_dnl
3939
M4_PARAM(`', `login', `name-',
4040
`M4_TYPE_BOOL()', false,

0 commit comments

Comments
 (0)