summaryrefslogtreecommitdiff
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index fc4863a4e..a24ed5fa7 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -10356,8 +10356,11 @@ static void dahdi_pri_message(struct pri *pri, char *s)
ast_mutex_lock(&pridebugfdlock);
- if (pridebugfd >= 0)
- write(pridebugfd, s, strlen(s));
+ if (pridebugfd >= 0) {
+ if (write(pridebugfd, s, strlen(s)) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ }
ast_mutex_unlock(&pridebugfdlock);
}
@@ -10392,8 +10395,11 @@ static void dahdi_pri_error(struct pri *pri, char *s)
ast_mutex_lock(&pridebugfdlock);
- if (pridebugfd >= 0)
- write(pridebugfd, s, strlen(s));
+ if (pridebugfd >= 0) {
+ if (write(pridebugfd, s, strlen(s)) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ }
ast_mutex_unlock(&pridebugfdlock);
}