Skip to content

Commit

Permalink
Ticket 48538 - Failed to delete old semaphore
Browse files Browse the repository at this point in the history
Bug Description:  The error would show:

Failed to delete /opt/dirsrv/var/run/dirsrv/slapd-localhost.stats

But really we were trying to delete /dev/shm/slapd-localhost.stats

Fix Description:  Update the error message to use the correct file path.

https://fedorahosted.org/389/ticket/48538

Author: wibrown

Review by: nhosoi (Thanks!)
  • Loading branch information
Firstyear committed Oct 17, 2016
1 parent 7070826 commit d53ad9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ldap/servers/slapd/snmp_collator.c
Expand Up @@ -459,22 +459,22 @@ snmp_collator_create_semaphore(void)
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", szStatsFile, errno, slapd_system_strerror(errno) );
"Error %d (%s).\n", stats_sem_name, 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",
szStatsFile, errno, slapd_system_strerror(errno) );
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",
szStatsFile, errno, slapd_system_strerror(errno) );
stats_sem_name, errno, slapd_system_strerror(errno) );
exit(1);
}
}
Expand Down

0 comments on commit d53ad9a

Please sign in to comment.