From: Joshua Colp Date: Mon, 4 Jun 2007 17:41:59 +0000 (+0000) Subject: Returning a value that indicates the parking of a call was a success when it really... X-Git-Tag: 1.4.5~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26038a4b77865608b817dd8f90738414922f0613;p=thirdparty%2Fasterisk.git Returning a value that indicates the parking of a call was a success when it really wasn't (because the parking slot selected was in use) is the wrong thing to do. (issue #9723 reported by mdu113) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67064 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_features.c b/res/res_features.c index 879b2b5913..9ffc2861d9 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -328,7 +328,7 @@ int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeou ast_mutex_unlock(&parking_lock); free(pu); ast_log(LOG_WARNING, "Requested parking extension already exists: %s@%s\n", parkingexten, parking_con); - return 0; /* Continue execution if possible */ + return -1; /* We failed to park this call, plain and simple so we need to error out */ } ast_copy_string(pu->parkingexten, parkingexten, sizeof(pu->parkingexten)); x = atoi(parkingexten);