Skip to content

Commit

Permalink
Low: asterisk: exit, don't return, in the face of uncaught errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fghaas committed Nov 10, 2011
1 parent 2cbb266 commit 58b5f55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions heartbeat/asterisk
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ asterisk_start() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "Asterisk PBX start command failed: $rc"
return $rc
exit $OCF_ERR_GENERIC
fi

# Spin waiting for the server to come up.
Expand All @@ -354,8 +354,8 @@ asterisk_start() {
rc=$?
[ $rc -eq $OCF_SUCCESS ] && break
if [ $rc -ne $OCF_NOT_RUNNING ]; then
ocf_log info "Asterisk PBX start failed: $rc"
return $OCF_ERR_GENERIC
ocf_log err "Asterisk PBX start failed"
exit $OCF_ERR_GENERIC
fi
sleep 2
done
Expand Down Expand Up @@ -392,7 +392,7 @@ asterisk_stop() {
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "Asterisk PBX couldn't be stopped"
return $OCF_ERR_GENERIC
exit $OCF_ERR_GENERIC
fi

# stop waiting
Expand Down

0 comments on commit 58b5f55

Please sign in to comment.