automerge commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Automerge script
2006-03-23 21:07:45 +00:00
parent de670a217d
commit 7cae785261
2 changed files with 11 additions and 8 deletions

View File

@@ -737,6 +737,8 @@ static void conf_flush(int fd, struct ast_channel *chan)
f = ast_read(chan); f = ast_read(chan);
if (f) if (f)
ast_frfree(f); ast_frfree(f);
else /* channel was hung up or something else happened */
break;
} }
} }

View File

@@ -95,7 +95,7 @@ static int readfile_exec(struct ast_channel *chan, void *data)
} }
} }
returnvar = ast_read_textfile(file); if ((returnvar = ast_read_textfile(file))) {
if (len > 0) { if (len > 0) {
if (len < strlen(returnvar)) if (len < strlen(returnvar))
returnvar[len]='\0'; returnvar[len]='\0';
@@ -104,6 +104,7 @@ static int readfile_exec(struct ast_channel *chan, void *data)
} }
pbx_builtin_setvar_helper(chan, varname, returnvar); pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar); free(returnvar);
}
LOCAL_USER_REMOVE(u); LOCAL_USER_REMOVE(u);
return res; return res;
} }