Remove condition that was impossible.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker
2008-02-12 22:22:54 +00:00
parent f3f663d6fd
commit 3bc94a27ca
2 changed files with 9 additions and 13 deletions

View File

@@ -149,18 +149,13 @@ run_asterisk()
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` & mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
fi fi
else else
if [ "${EXITSTATUS}" = "0" ]; then echo "Asterisk died with code $EXITSTATUS."
echo "Asterisk ended normally. Aborting."
exit 0
else
echo "Asterisk died with code $EXITSTATUS."
PID=`cat ${ASTPIDFILE}` PID=`cat ${ASTPIDFILE}`
if [ -f /tmp/core.${PID} ]; then if [ -f /tmp/core.${PID} ]; then
mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-`date -Iseconds` & mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
elif [ -f /tmp/core ]; then elif [ -f /tmp/core ]; then
mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` & mv /tmp/core ${DUMPDROP}/core.`hostname`-`date -Iseconds` &
fi
fi fi
fi fi
echo "Automatically restarting Asterisk." echo "Automatically restarting Asterisk."

View File

@@ -1721,7 +1721,8 @@ static int ast_el_read_char(EditLine *el, char *cp)
struct pollfd fds[2]; struct pollfd fds[2];
int res; int res;
int max; int max;
char buf[512]; #define EL_BUF_SIZE 512
char buf[EL_BUF_SIZE];
for (;;) { for (;;) {
max = 1; max = 1;
@@ -1784,7 +1785,7 @@ static int ast_el_read_char(EditLine *el, char *cp)
if (!ast_opt_exec && !lastpos) if (!ast_opt_exec && !lastpos)
write(STDOUT_FILENO, "\r", 1); write(STDOUT_FILENO, "\r", 1);
write(STDOUT_FILENO, buf, res); write(STDOUT_FILENO, buf, res);
if ((buf[res-1] == '\n') || (buf[res-2] == '\n')) { if ((res < EL_BUF_SIZE - 1) && ((buf[res-1] == '\n') || (buf[res-2] == '\n'))) {
*cp = CC_REFRESH; *cp = CC_REFRESH;
return(1); return(1);
} else { } else {