diff options
author | twisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-18 03:29:12 +0000 |
---|---|---|
committer | twisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-18 03:29:12 +0000 |
commit | be40e92107c4645f13a62ec42e0a554951e0c2a6 (patch) | |
tree | e78285975e80117cbc6e437c719e143dd40acd9f /apps | |
parent | a7e7f480c30eb6ddbf475c6c5ee558247dd17856 (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')
-rwxr-xr-x | apps/app_chanisavail.c | 2 |
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); |