[asterisk-commits] rizzo: trunk r48477 - in /trunk: include/asterisk/channel.h main/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Dec 14 21:03:42 MST 2006


Author: rizzo
Date: Thu Dec 14 22:03:42 2006
New Revision: 48477

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48477
Log:
constify ast_state2str() and note it is not reentrant.


Modified:
    trunk/include/asterisk/channel.h
    trunk/main/channel.c

Modified: trunk/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=48477&r1=48476&r2=48477
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Thu Dec 14 22:03:42 2006
@@ -1060,7 +1060,7 @@
  * Give a name to a state 
  * Returns the text form of the binary state given
  */
-char *ast_state2str(enum ast_channel_state);
+const char *ast_state2str(enum ast_channel_state);
 
 /*! Gives the string form of a given transfer capability */
 /*!

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=48477&r1=48476&r2=48477
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Thu Dec 14 22:03:42 2006
@@ -516,8 +516,10 @@
 	return -1;
 }
 
-/*! \brief Gives the string form of a given channel state */
-char *ast_state2str(enum ast_channel_state state)
+/*! \brief Gives the string form of a given channel state.
+	\note This function is not reentrant.
+ */
+const char *ast_state2str(enum ast_channel_state state)
 {
 	char *buf;
 



More information about the asterisk-commits mailing list