From: Arran Cudbard-Bell Date: Wed, 22 Apr 2026 17:13:43 +0000 (-0400) Subject: rlm_kafka: use the cached log_prefix in the self-pipe error cb X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a60e5b02bf0174fd3254fdaeb84f42e80b0d430;p=thirdparty%2Ffreeradius-server.git rlm_kafka: use the cached log_prefix in the self-pipe error cb _kafka_fd_error was hard-coding the literal "kafka" prefix. Pull the thread context off the event's uctx and format against the same "rlm_kafka ()" prefix the rest of the module uses, so multi-instance configurations show which instance's self-pipe fell over. --- diff --git a/src/modules/rlm_kafka/rlm_kafka.c b/src/modules/rlm_kafka/rlm_kafka.c index 47e88b2137a..171ba13227e 100644 --- a/src/modules/rlm_kafka/rlm_kafka.c +++ b/src/modules/rlm_kafka/rlm_kafka.c @@ -296,9 +296,11 @@ static void _kafka_fd_readable(UNUSED fr_event_list_t *el, int fd, UNUSED int fl * @param[in] fd_errno errno as reported by the event loop. * @param[in] uctx UNUSED. */ -static void _kafka_fd_error(UNUSED fr_event_list_t *el, int fd, UNUSED int flags, int fd_errno, UNUSED void *uctx) +static void _kafka_fd_error(UNUSED fr_event_list_t *el, int fd, UNUSED int flags, int fd_errno, void *uctx) { - FATAL("kafka - self-pipe error (fd=%d): %s", fd, fr_syserror(fd_errno)); + rlm_kafka_thread_t *t = talloc_get_type_abort(uctx, rlm_kafka_thread_t); + + FATAL("%s - self-pipe error (fd=%d): %s", t->inst->log_prefix, fd, fr_syserror(fd_errno)); } /** Translate a librdkafka delivery-report error into a module rcode