[svn-commits] dvossel: trunk r205412 - in /trunk: ./ include/asterisk/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 8 17:15:11 CDT 2009


Author: dvossel
Date: Wed Jul  8 17:15:06 2009
New Revision: 205412

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205412
Log:
Merged revisions 205409 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r205409 | dvossel | 2009-07-08 16:35:12 -0500 (Wed, 08 Jul 2009) | 6 lines
  
  moving ast_devstate_to_extenstate to pbx.c from devicestate.c
  
  ast_devstate_to_extenstate belongs in pbx.c.  This change
  fixes a compile time error with chan_vpb as well.
........

Modified:
    trunk/   (props changed)
    trunk/include/asterisk/devicestate.h
    trunk/include/asterisk/pbx.h
    trunk/main/devicestate.c
    trunk/main/pbx.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/include/asterisk/devicestate.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/devicestate.h?view=diff&rev=205412&r1=205411&r2=205412
==============================================================================
--- trunk/include/asterisk/devicestate.h (original)
+++ trunk/include/asterisk/devicestate.h Wed Jul  8 17:15:06 2009
@@ -249,15 +249,6 @@
 enum ast_device_state ast_devstate_aggregate_result(struct ast_devstate_aggregate *agg);
 
 /*!
- * \brief Map devstate to an extension state.
- *
- * \param[in] device state
- *
- * \return the extension state mapping.
- */
-enum ast_extension_states ast_devstate_to_extenstate(enum ast_device_state devstate);
-
-/*!
  * \brief You shouldn't care about the contents of this struct
  *
  * This struct is only here so that it can be easily declared on the stack.

Modified: trunk/include/asterisk/pbx.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/pbx.h?view=diff&rev=205412&r1=205411&r2=205412
==============================================================================
--- trunk/include/asterisk/pbx.h (original)
+++ trunk/include/asterisk/pbx.h Wed Jul  8 17:15:06 2009
@@ -24,6 +24,7 @@
 #define _ASTERISK_PBX_H
 
 #include "asterisk/sched.h"
+#include "asterisk/devicestate.h"
 #include "asterisk/chanvars.h"
 #include "asterisk/hashtab.h"
 #include "asterisk/stringfields.h"
@@ -361,6 +362,14 @@
 	int priority, const char *label, const char *callerid, 
 	const char *application, void *data, void (*datad)(void *), const char *registrar);
 
+/*!
+ * \brief Map devstate to an extension state.
+ *
+ * \param[in] device state
+ *
+ * \return the extension state mapping.
+ */
+enum ast_extension_states ast_devstate_to_extenstate(enum ast_device_state devstate);
 
 /*! 
  * \brief Uses hint and devicestate callback to get the state of an extension

Modified: trunk/main/devicestate.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/devicestate.c?view=diff&rev=205412&r1=205411&r2=205412
==============================================================================
--- trunk/main/devicestate.c (original)
+++ trunk/main/devicestate.c Wed Jul  8 17:15:06 2009
@@ -791,31 +791,6 @@
 	}
 }
 
-enum ast_extension_states ast_devstate_to_extenstate(enum ast_device_state devstate)
-{
-	switch (devstate) {
-	case AST_DEVICE_ONHOLD:
-		return AST_EXTENSION_ONHOLD;
-	case AST_DEVICE_BUSY:
-		return AST_EXTENSION_BUSY;
-	case AST_DEVICE_UNAVAILABLE:
-	case AST_DEVICE_UNKNOWN:
-	case AST_DEVICE_INVALID:
-		return AST_EXTENSION_UNAVAILABLE;
-	case AST_DEVICE_RINGINUSE:
-		return (AST_EXTENSION_INUSE | AST_EXTENSION_RINGING);
-	case AST_DEVICE_RINGING:
-		return AST_EXTENSION_RINGING;
-	case AST_DEVICE_INUSE:
-		return AST_EXTENSION_INUSE;
-	case AST_DEVICE_NOT_INUSE:
-		return AST_EXTENSION_NOT_INUSE;
-	case AST_DEVICE_TOTAL: /* not a device state, included for completeness */
-		break;
-	}
-
-	return AST_EXTENSION_NOT_INUSE;
-}
 
 enum ast_device_state ast_devstate_aggregate_result(struct ast_devstate_aggregate *agg)
 {

Modified: trunk/main/pbx.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/pbx.c?view=diff&rev=205412&r1=205411&r2=205412
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed Jul  8 17:15:06 2009
@@ -4083,6 +4083,32 @@
 	return e;
 }
 
+enum ast_extension_states ast_devstate_to_extenstate(enum ast_device_state devstate)
+{
+	switch (devstate) {
+	case AST_DEVICE_ONHOLD:
+		return AST_EXTENSION_ONHOLD;
+	case AST_DEVICE_BUSY:
+		return AST_EXTENSION_BUSY;
+	case AST_DEVICE_UNAVAILABLE:
+	case AST_DEVICE_UNKNOWN:
+	case AST_DEVICE_INVALID:
+		return AST_EXTENSION_UNAVAILABLE;
+	case AST_DEVICE_RINGINUSE:
+		return (AST_EXTENSION_INUSE | AST_EXTENSION_RINGING);
+	case AST_DEVICE_RINGING:
+		return AST_EXTENSION_RINGING;
+	case AST_DEVICE_INUSE:
+		return AST_EXTENSION_INUSE;
+	case AST_DEVICE_NOT_INUSE:
+		return AST_EXTENSION_NOT_INUSE;
+	case AST_DEVICE_TOTAL: /* not a device state, included for completeness */
+		break;
+	}
+
+	return AST_EXTENSION_NOT_INUSE;
+}
+
 /*! \brief Check state of extension by using hints */
 static int ast_extension_state2(struct ast_exten *e)
 {




More information about the svn-commits mailing list