aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_chanisavail.c
diff options
context:
space:
mode:
authortwisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-18 03:29:12 +0000
committertwisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-18 03:29:12 +0000
commitbe40e92107c4645f13a62ec42e0a554951e0c2a6 (patch)
treee78285975e80117cbc6e437c719e143dd40acd9f /apps/app_chanisavail.c
parenta7e7f480c30eb6ddbf475c6c5ee558247dd17856 (diff)
Don't only accept AST_DEVICE_UNKNOWN when we're trying to determine if the device is in use. (Bug # 5338)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6815 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanisavail.c')
-rwxr-xr-xapps/app_chanisavail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c
index 4e5e52449..7dc2ba023 100755
--- a/apps/app_chanisavail.c
+++ b/apps/app_chanisavail.c
@@ -115,7 +115,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
snprintf(trychan, sizeof(trychan), "%s/%s",cur,number);
status = inuse = ast_device_state(trychan);
}
- if ((inuse < 1) && (tempchan = ast_request(tech, chan->nativeformats, number, &status))) {
+ if ((inuse <= 1) && (tempchan = ast_request(tech, chan->nativeformats, number, &status))) {
pbx_builtin_setvar_helper(chan, "AVAILCHAN", tempchan->name);
/* Store the originally used channel too */
snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);