]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix how we print global messages in rlm_icmp
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 12 May 2024 17:28:32 +0000 (11:28 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 12 May 2024 17:28:32 +0000 (11:28 -0600)
src/modules/rlm_icmp/rlm_icmp.c

index cdcb289b9c2bc19cd2db06662c780c6fb60e96f8..852e0258b4c99ce1edb54296e36b2844c7bb2f3e 100644 (file)
@@ -23,8 +23,6 @@
  */
 RCSID("$Id$")
 
-#define LOG_PREFIX mctx->mi->name
-
 #include <freeradius-devel/server/base.h>
 #include <freeradius-devel/server/module_rlm.h>
 #include <freeradius-devel/util/cap.h>
@@ -346,7 +344,7 @@ static void mod_icmp_read(UNUSED fr_event_list_t *el, UNUSED int sockfd, UNUSED
        my_echo.counter = icmp->counter;
        echo = fr_rb_find(t->tree, &my_echo);
        if (!echo) {
-               DEBUG("Can't find packet counter=%d in tree", icmp->counter);
+               DEBUG("%s - Can't find packet counter=%d in tree", mctx->mi->name, icmp->counter);
                return;
        }
 
@@ -365,7 +363,7 @@ static void mod_icmp_error(fr_event_list_t *el, UNUSED int sockfd, UNUSED int fl
        module_ctx_t const      *mctx = talloc_get_type_abort(uctx, module_ctx_t);
        rlm_icmp_thread_t       *t = talloc_get_type_abort(mctx->thread, rlm_icmp_thread_t);
 
-       ERROR("Failed reading from ICMP socket - Closing it");
+       ERROR("%s - Failed reading from ICMP socket - Closing it", mctx->mi->name);
 
        (void) fr_event_fd_delete(el, t->fd, FR_EVENT_FILTER_IO);
        close(t->fd);