summaryrefslogtreecommitdiff
path: root/modules/dtmfio
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-06-27 20:48:41 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-06-27 20:48:41 +0200
commit8b5ced23d0986ccb510c2c9b1eb59bda2200fe81 (patch)
tree407efdaf5578279ac3337722283c0bbd6dbe3431 /modules/dtmfio
parent4172027f214d50348e3fc029e068e8bb4a140deb (diff)
dtmfio: add error checking
Diffstat (limited to 'modules/dtmfio')
-rw-r--r--modules/dtmfio/dtmfio.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/dtmfio/dtmfio.c b/modules/dtmfio/dtmfio.c
index 854e270..ce88743 100644
--- a/modules/dtmfio/dtmfio.c
+++ b/modules/dtmfio/dtmfio.c
@@ -106,11 +106,11 @@ static void ua_event_handler(struct ua *ua,
static int module_init(void)
{
- uag_event_register( ua_event_handler, NULL );
-
if ( mkfifo( DTMF_OUT, S_IWUSR | S_IRUSR ) ) {
+ int err = errno;
error("Creation of the FIFO errored."
- " This might cause issues.\n");
+ " This might cause issues. (%m)\n", err);
+ return err;
}
fd = fopen( DTMF_OUT , "w+" );
@@ -120,6 +120,8 @@ static int module_init(void)
" This might cause issues.\n");
}
+ uag_event_register( ua_event_handler, NULL );
+
return 0;
}