fixing zap device name and adding error message for a failed open in mod_dahdi_codec

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11720 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Moises Silva 2009-02-09 20:32:26 +00:00
parent 40b1184fe3
commit d91142038e

View File

@ -345,7 +345,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dahdi_codec_load)
if (!stat(transcoding_device_dahdi, &statbuf)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "DAHDI transcoding device found.\n");
transcoding_device = transcoding_device_dahdi;
transcoder_name = transcoder_name_zap;
transcoder_name = transcoder_name_dahdi;
} else if (!stat(transcoding_device_zap, &statbuf)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Zap transcoding device found.\n");
transcoding_device = transcoding_device_zap;
@ -357,7 +357,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dahdi_codec_load)
fd = open(transcoding_device, O_RDWR);
if (fd < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open %s transcoder device.\n", transcoder_name);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open %s transcoder device: %s.\n",
transcoder_name, strerror(errno));
return SWITCH_STATUS_FALSE;
}