[Pkg-voip-commits] [dahdi-tools] 182/285: dahdi_cfg: error()->perror() when sem_open fails.
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:18:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch master
in repository dahdi-tools.
commit 066fa2aff33ba32208e6f3341ba76676a0419da2
Author: Shaun Ruffell <sruffell at digium.com>
Date: Wed Feb 12 11:49:39 2014 -0600
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 at digium.com>
---
dahdi_cfg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dahdi_cfg.c b/dahdi_cfg.c
index 4e9cc9e..620383b 100644
--- a/dahdi_cfg.c
+++ b/dahdi_cfg.c
@@ -1672,13 +1672,13 @@ finish:
lock = sem_open(SEM_NAME, O_CREAT, O_RDWR, 1);
if (SEM_FAILED == lock) {
- error("Unable to create 'dahdi_cfg' mutex.\n");
+ perror("Unable to create 'dahdi_cfg' mutex");
exit_code = 1;
goto release_sem;
}
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;
goto unlink_sem;
}
@@ -1730,7 +1730,7 @@ finish:
}
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;
goto unlink_sem;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git
More information about the Pkg-voip-commits
mailing list