formatting fixes (bug #4736)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Russell Bryant 21 years ago
parent 4817bc599d
commit 324f7d150f

25
pbx.c

@ -226,9 +226,7 @@ static struct pbx_builtin {
} builtins[] =
{
/* These applications are built into the PBX core and do not
need separate modules
*/
need separate modules */
{ "AbsoluteTimeout", pbx_builtin_atimeout,
"Set absolute maximum time of call",
@ -763,7 +761,6 @@ static int matchcid(const char *cidpattern, const char *callerid)
/* If the Caller*ID pattern is empty, then we're matching NO Caller*ID, so
failing to get a number should count as a match, otherwise not */
if (!ast_strlen_zero(cidpattern))
failresult = 0;
else
@ -1281,7 +1278,7 @@ int ast_custom_function_register(struct ast_custom_function *acf)
/* try to lock functions list ... */
if (ast_mutex_lock(&acflock)) {
ast_log(LOG_ERROR, "Unable to lock function list\n");
ast_log(LOG_ERROR, "Unable to lock function list. Failed registering function %s\n", acf->name);
return -1;
}
@ -1309,7 +1306,10 @@ char *ast_func_read(struct ast_channel *chan, const char *in, char *workspace, s
struct ast_custom_function *acfptr;
function = ast_strdupa(in);
if (function) {
if (!function) {
ast_log(LOG_ERROR, "Out of memory\n");
return ret;
}
if ((args = strchr(function, '('))) {
*args = '\0';
args++;
@ -1332,9 +1332,6 @@ char *ast_func_read(struct ast_channel *chan, const char *in, char *workspace, s
} else {
ast_log(LOG_ERROR, "Function %s not registered\n", function);
}
} else {
ast_log(LOG_ERROR, "Out of memory\n");
}
return ret;
}
@ -1344,7 +1341,10 @@ void ast_func_write(struct ast_channel *chan, const char *in, const char *value)
struct ast_custom_function *acfptr;
function = ast_strdupa(in);
if (function) {
if (!function) {
ast_log(LOG_ERROR, "Out of memory\n");
return;
}
if ((args = strchr(function, '('))) {
*args = '\0';
args++;
@ -1362,14 +1362,11 @@ void ast_func_write(struct ast_channel *chan, const char *in, const char *value)
if (acfptr->write) {
acfptr->write(chan, function, args, value);
} else {
ast_log(LOG_ERROR, "Function %s cannot be written to\n", function);
ast_log(LOG_ERROR, "Function %s is read-only, it cannot be written to\n", function);
}
} else {
ast_log(LOG_ERROR, "Function %s not registered\n", function);
}
} else {
ast_log(LOG_ERROR, "Out of memory\n");
}
}
static void pbx_substitute_variables_helper_full(struct ast_channel *c, const char *cp1, char *cp2, int count, struct varshead *headp)

Loading…
Cancel
Save