summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-02-28 10:58:08 -0800
committerDave Barach <vpp@barachs.net>2023-02-28 20:01:20 +0000
commit729b9c94f8222346a61c21d21a674bcb9b5974f8 (patch)
treedd9d68797cf7cbded2528c7da3445d37751406de /src
parent7e1d6efb5829897faaab69e2da79e9dfe265e5da (diff)
vcl: use program invocation name in ldp app name
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2c97faa2cdca32d083aabc3344c8fe67c74ff2fd
Diffstat (limited to 'src')
-rw-r--r--src/vcl/ldp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 9e8858fb230..0f3147610d8 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -155,15 +155,14 @@ ldp_worker_get_current (void)
static inline void
ldp_set_app_name (char *app_name)
{
- snprintf (ldp->app_name, LDP_APP_NAME_MAX,
- "ldp-%d-%s", getpid (), app_name);
+ snprintf (ldp->app_name, LDP_APP_NAME_MAX, "%s-ldp-%d", app_name, getpid ());
}
static inline char *
ldp_get_app_name ()
{
if (ldp->app_name[0] == '\0')
- ldp_set_app_name ("app");
+ ldp_set_app_name (program_invocation_short_name);
return ldp->app_name;
}