Merged revisions 277327 via svnmerge from
authorMatthew Nicholson <mnicholson@digium.com>
Fri, 16 Jul 2010 18:31:08 +0000 (18:31 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Fri, 16 Jul 2010 18:31:08 +0000 (18:31 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277327 | mnicholson | 2010-07-16 13:30:22 -0500 (Fri, 16 Jul 2010) | 8 lines

  Interpret device state AST_DEVICE_UNKNOWN as extension state AST_EXTENSION_NOT_INUSE.

  (closes issue #16035)
  Reported by: francesco_r
  Patches:
        pbx.c.patch uploaded by viniciusfontes (license 978)
  Tested by: francesco_r, agx, lawbar
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277331 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 3de9417..4216b85 100644 (file)
@@ -4133,8 +4133,9 @@ enum ast_extension_states ast_devstate_to_extenstate(enum ast_device_state devst
                return AST_EXTENSION_ONHOLD;
        case AST_DEVICE_BUSY:
                return AST_EXTENSION_BUSY;
-       case AST_DEVICE_UNAVAILABLE:
        case AST_DEVICE_UNKNOWN:
+               return AST_EXTENSION_NOT_INUSE;
+       case AST_DEVICE_UNAVAILABLE:
        case AST_DEVICE_INVALID:
                return AST_EXTENSION_UNAVAILABLE;
        case AST_DEVICE_RINGINUSE: