|
|
|
@ -99,8 +99,6 @@ int ast_app_dtget(struct ast_channel *chan, const char *context, char *collect,
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \param timeout set timeout to 0 for "standard" timeouts. Set timeout to -1 for
|
|
|
|
|
"ludicrous time" (essentially never times out) */
|
|
|
|
|
int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout)
|
|
|
|
@ -555,10 +553,9 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile,
|
|
|
|
|
if (option_verbose > 2)
|
|
|
|
|
ast_verbose(VERBOSE_PREFIX_3 "x=%d, open writing: %s format: %s, %p\n", x, prepend ? prependfile : recordfile, sfmt[x], others[x]);
|
|
|
|
|
|
|
|
|
|
if (!others[x]) {
|
|
|
|
|
if (!others[x])
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (path)
|
|
|
|
|
ast_unlock_path(path);
|
|
|
|
@ -925,7 +922,7 @@ enum AST_LOCK_RESULT ast_lock_path(const char *path)
|
|
|
|
|
snprintf(fs, strlen(path) + 19, "%s/.lock-%08lx", path, ast_random());
|
|
|
|
|
fd = open(fs, O_WRONLY | O_CREAT | O_EXCL, 0600);
|
|
|
|
|
if (fd < 0) {
|
|
|
|
|
fprintf(stderr, "Unable to create lock file '%s': %s\n", path, strerror(errno));
|
|
|
|
|
ast_log(LOG_ERROR, "Unable to create lock file '%s': %s\n", path, strerror(errno));
|
|
|
|
|
return AST_LOCK_PATH_NOT_FOUND;
|
|
|
|
|
}
|
|
|
|
|
close(fd);
|
|
|
|
@ -1056,6 +1053,7 @@ int ast_record_review(struct ast_channel *chan, const char *playfile, const char
|
|
|
|
|
#define RES_RESTART ((1 << 19) | RES_REPEAT)
|
|
|
|
|
|
|
|
|
|
static int ast_ivr_menu_run_internal(struct ast_channel *chan, struct ast_ivr_menu *menu, void *cbdata);
|
|
|
|
|
|
|
|
|
|
static int ivr_dispatch(struct ast_channel *chan, struct ast_ivr_option *option, char *exten, void *cbdata)
|
|
|
|
|
{
|
|
|
|
|
int res;
|
|
|
|
@ -1242,12 +1240,9 @@ static int ast_ivr_menu_run_internal(struct ast_channel *chan, struct ast_ivr_me
|
|
|
|
|
|
|
|
|
|
int ast_ivr_menu_run(struct ast_channel *chan, struct ast_ivr_menu *menu, void *cbdata)
|
|
|
|
|
{
|
|
|
|
|
int res;
|
|
|
|
|
res = ast_ivr_menu_run_internal(chan, menu, cbdata);
|
|
|
|
|
int res = ast_ivr_menu_run_internal(chan, menu, cbdata);
|
|
|
|
|
/* Hide internal coding */
|
|
|
|
|
if (res > 0)
|
|
|
|
|
res = 0;
|
|
|
|
|
return res;
|
|
|
|
|
return res > 0 ? 0 : res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *ast_read_textfile(const char *filename)
|
|
|
|
@ -1318,3 +1313,4 @@ int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags
|
|
|
|
|
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|