[svn-commits] dvossel: branch 1.4 r205409 - in /branches/1.4: include/asterisk/ main/

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


Author: dvossel
Date: Wed Jul  8 16:35:12 2009
New Revision: 205409

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205409
Log:
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:
    branches/1.4/include/asterisk/devicestate.h
    branches/1.4/include/asterisk/pbx.h
    branches/1.4/main/devicestate.c
    branches/1.4/main/pbx.c

Modified: branches/1.4/include/asterisk/devicestate.h
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/include/asterisk/devicestate.h?view=diff&rev=205409&r1=205408&r2=205409
==============================================================================
--- branches/1.4/include/asterisk/devicestate.h (original)
+++ branches/1.4/include/asterisk/devicestate.h Wed Jul  8 16:35:12 2009
@@ -152,15 +152,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: branches/1.4/include/asterisk/pbx.h
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/include/asterisk/pbx.h?view=diff&rev=205409&r1=205408&r2=205409
==============================================================================
--- branches/1.4/include/asterisk/pbx.h (original)
+++ branches/1.4/include/asterisk/pbx.h Wed Jul  8 16:35:12 2009
@@ -273,6 +273,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 Register an application.

Modified: branches/1.4/main/devicestate.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/main/devicestate.c?view=diff&rev=205409&r1=205408&r2=205409
==============================================================================
--- branches/1.4/main/devicestate.c (original)
+++ branches/1.4/main/devicestate.c Wed Jul  8 16:35:12 2009
@@ -432,31 +432,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)
 {
 	if (agg->all_free)

Modified: branches/1.4/main/pbx.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=205409&r1=205408&r2=205409
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Wed Jul  8 16:35:12 2009
@@ -1912,6 +1912,32 @@
 	ast_unlock_contexts();
 
 	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  ast_extensions_state2: Check state of extension by using hints */




More information about the svn-commits mailing list