Skip to content

Commit 1abbbd1

Browse files
fix: Fixed issue where batching may have been used when it was not meant to be.
Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
1 parent 5e56624 commit 1abbbd1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/modules/rlm_linelog/rlm_linelog.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,6 @@ static xlat_action_t linelog_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
528528
{
529529
rlm_linelog_t const *inst = talloc_get_type_abort_const(xctx->mctx->mi->data, rlm_linelog_t);
530530
linelog_call_env_t const *call_env = talloc_get_type_abort(xctx->env_data, linelog_call_env_t);
531-
xlat_action_t ret;
532531

533532
struct iovec vector[2];
534533
size_t i = 0;
@@ -556,7 +555,6 @@ static xlat_action_t linelog_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
556555
return XLAT_ACTION_FAIL;
557556

558557
case LINELOG_BUFFER_WRITE_DONE:
559-
ret = XLAT_ACTION_DONE;
560558
break;
561559

562560
case LINELOG_BUFFER_WRITE_YIELD:
@@ -566,7 +564,6 @@ static xlat_action_t linelog_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
566564
slen = entry->data_len;
567565
} else {
568566
slen = linelog_write(inst, call_env, request, vector, i, with_delim);
569-
ret = XLAT_ACTION_DONE;
570567
}
571568

572569
if (slen < 0) return XLAT_ACTION_FAIL;
@@ -576,7 +573,7 @@ static xlat_action_t linelog_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
576573

577574
fr_dcursor_insert(out, wrote);
578575

579-
return ret;
576+
return XLAT_ACTION_DONE;
580577
}
581578

582579
typedef struct {
@@ -979,7 +976,7 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
979976
}
980977
}
981978

982-
if (inst->file.buffer_count != 0 || fr_time_delta_unwrap(inst->file.buffer_delay) != 0) {
979+
if (inst->file.buffer_count != 0 || ((inst->file.buffer_delay_is_set) && (fr_time_delta_unwrap(inst->file.buffer_delay) != 0))) {
983980
inst->file.buffer_write = true;
984981

985982
if (inst->file.buffer_delay_is_set && !inst->file.buffer_expiry_is_set) {

0 commit comments

Comments
 (0)