Tuesday, May 23, 2017

[389-commits] [389-ds-base] 03/03: Ticket 48538 - Failed to delete old semaphore

This is an automated email from the git hooks/post-receive script.

mreynolds pushed a commit to branch 389-ds-base-1.3.6
in repository 389-ds-base.

commit ca548a77317ccd40400219272d6f9e1469e77f1b
Author: William Brown <firstyear@redhat.com>
Date: Fri May 12 10:09:32 2017 +1000

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: mreynolds (Thanks!)

(cherry picked from commit b81c8ba38c29e15e13b0dd0bf6f5d3c773d31b20)
---
ldap/servers/slapd/snmp_collator.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c
index 852d157..efe574c 100644
--- a/ldap/servers/slapd/snmp_collator.c
+++ b/ldap/servers/slapd/snmp_collator.c
@@ -458,23 +458,23 @@ 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). "
- "Error %d (%s).\n", stats_sem_name, errno, slapd_system_strerror(errno) );
+ "Failed to delete old semaphore for stats file (/dev/shm/sem.%s). "
+ "Error %d (%s).\n", stats_sem_name + 1, errno, slapd_system_strerror(errno) );
exit(1);
}

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",
- stats_sem_name, errno, slapd_system_strerror(errno) );
+ "Failed to create semaphore for stats file (/dev/shm/sem.%s). Error %d (%s).\n",
+ stats_sem_name + 1, 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",
- stats_sem_name, errno, slapd_system_strerror(errno) );
+ "Failed to create semaphore for stats file (/dev/shm/sem.%s). Error %d.(%s)\n",
+ stats_sem_name + 1, errno, slapd_system_strerror(errno) );
exit(1);
}
}

--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org

No comments:

Post a Comment