From 43d527cba51c6ac5ad14f96249c76739646751c5 Mon Sep 17 00:00:00 2001 From: William Brown Date: Fri, 12 May 2017 10:09:32 +1000 Subject: [PATCH] Ticket 48538 - Failed to delete old semaphore Bug Description: I misunderstood the sem_unlink call, and logged the wrong filepath. Fix Description: Fix the file path of the semaphore. https://pagure.io/389-ds-base/issue/48538 Author: wibrown Review by: ??? --- ldap/servers/slapd/snmp_collator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c index 852d157..c49400e 100644 --- a/ldap/servers/slapd/snmp_collator.c +++ b/ldap/servers/slapd/snmp_collator.c @@ -458,7 +458,7 @@ snmp_collator_create_semaphore(void) * around. Recreate it since we don't know what state it is in. */ if (sem_unlink(stats_sem_name) != 0) { slapi_log_err(SLAPI_LOG_EMERG, "snmp_collator_create_semaphore", - "Failed to delete old semaphore for stats file (%s). " + "Failed to delete old semaphore for stats file (/dev/shm%s). " "Error %d (%s).\n", stats_sem_name, errno, slapd_system_strerror(errno) ); exit(1); } @@ -466,14 +466,14 @@ snmp_collator_create_semaphore(void) if ((stats_sem = sem_open(stats_sem_name, O_CREAT | O_EXCL, SLAPD_DEFAULT_FILE_MODE, 1)) == SEM_FAILED) { /* No dice */ slapi_log_err(SLAPI_LOG_EMERG, "snmp_collator_create_semaphore", - "Failed to create semaphore for stats file (%s). Error %d (%s).\n", + "Failed to create semaphore for stats file (/dev/shm%s). Error %d (%s).\n", stats_sem_name, errno, slapd_system_strerror(errno) ); exit(1); } } else { /* Some other problem occurred creating the semaphore. */ slapi_log_err(SLAPI_LOG_EMERG, "snmp_collator_create_semaphore", - "Failed to create semaphore for stats file (%s). Error %d.(%s)\n", + "Failed to create semaphore for stats file (/dev/shm%s). Error %d.(%s)\n", stats_sem_name, errno, slapd_system_strerror(errno) ); exit(1); } -- 1.8.3.1