summaryrefslogtreecommitdiff
path: root/apps/app_chanisavail.c
diff options
context:
space:
mode:
authorJosh Roberson <josh@asteriasgi.com>2005-10-18 03:29:12 +0000
committerJosh Roberson <josh@asteriasgi.com>2005-10-18 03:29:12 +0000
commit82d702051630e842a6a2df00361021f31a8be791 (patch)
treee78285975e80117cbc6e437c719e143dd40acd9f /apps/app_chanisavail.c
parent463ad17f5da04eb22eac7280db38a15c1458a03a (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: https://origsvn.digium.com/svn/asterisk/trunk@6815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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);