Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv2415/apps

Modified Files:
        app_chanisavail.c 
Log Message:
Don't only accept AST_DEVICE_UNKNOWN when we're trying to determine if the 
device is in use.  (Bug # 5338)


Index: app_chanisavail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_chanisavail.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- app_chanisavail.c   28 Sep 2005 19:42:36 -0000      1.21
+++ app_chanisavail.c   18 Oct 2005 03:29:12 -0000      1.22
@@ -115,7 +115,7 @@
                                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);

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to