dahdi_cfg: error()->perror() when sem_open fails.
This fixes a confusing error message. When sem_open failed, the system.conf line number was being printed and the system error code was not. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
This commit is contained in:
parent
bce5afacf1
commit
066fa2aff3
@ -1672,13 +1672,13 @@ finish:
|
|||||||
|
|
||||||
lock = sem_open(SEM_NAME, O_CREAT, O_RDWR, 1);
|
lock = sem_open(SEM_NAME, O_CREAT, O_RDWR, 1);
|
||||||
if (SEM_FAILED == lock) {
|
if (SEM_FAILED == lock) {
|
||||||
error("Unable to create 'dahdi_cfg' mutex.\n");
|
perror("Unable to create 'dahdi_cfg' mutex");
|
||||||
exit_code = 1;
|
exit_code = 1;
|
||||||
goto release_sem;
|
goto release_sem;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-1 == sem_wait(lock)) {
|
if (-1 == sem_wait(lock)) {
|
||||||
error("Failed to wait for dahdi_cfg mutex.\n");
|
perror("Failed to wait for 'dahdi_cfg' mutex");
|
||||||
exit_code = 1;
|
exit_code = 1;
|
||||||
goto unlink_sem;
|
goto unlink_sem;
|
||||||
}
|
}
|
||||||
@ -1730,7 +1730,7 @@ finish:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (-1 == sem_wait(lock)) {
|
if (-1 == sem_wait(lock)) {
|
||||||
error("Failed to wait for dahdi_cfg mutex after creating dynamic spans.\n");
|
perror("Failed to wait for 'dahdi_cfg' mutex after creating dynamic spans");
|
||||||
exit_code = 1;
|
exit_code = 1;
|
||||||
goto unlink_sem;
|
goto unlink_sem;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user