ftmod_libpri: Write fatal error message during span configuration to console (and to span error log).

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
This commit is contained in:
Stefan Knoblich 2010-11-07 19:55:00 +01:00
parent 81515b7bd8
commit 428d05349a
1 changed files with 4 additions and 1 deletions

View File

@ -1424,7 +1424,8 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_libpri_configure_span)
isdn_data->l1 = PRI_LAYER_1_ULAW;
break;
default:
ftdm_log(FTDM_LOG_ERROR, "Invalid trunk type\n");
ftdm_log(FTDM_LOG_ERROR, "Invalid trunk type: '%s'\n", ftdm_trunk_type2str(ftdm_span_get_trunk_type(span)));
snprintf(span->last_error, sizeof(span->last_error), "Invalid trunk type [%s]", ftdm_trunk_type2str(ftdm_span_get_trunk_type(span)));
return FTDM_FAIL;
}
@ -1434,6 +1435,7 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_libpri_configure_span)
if (!val) {
ftdm_log(FTDM_LOG_ERROR, "Parameter '%s' has no value\n", var);
snprintf(span->last_error, sizeof(span->last_error), "Parameter [%s] has no value", var);
return FTDM_FAIL;
}
@ -1462,6 +1464,7 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_libpri_configure_span)
}
}
else {
ftdm_log(FTDM_LOG_ERROR, "Unknown parameter '%s', aborting configuration\n", var);
snprintf(span->last_error, sizeof(span->last_error), "Unknown parameter [%s]", var);
return FTDM_FAIL;
}