diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-12-15 04:03:42 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-12-15 04:03:42 +0000 |
commit | 112262198185c249a948bdb91d86427a909f781b (patch) | |
tree | 3e68f630a80e726d516dfe27e4273daf35494bf7 | |
parent | 5ba11f985516c84d6dd326a2d61f52ba54ae7de4 (diff) |
constify ast_state2str() and note it is not reentrant.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | include/asterisk/channel.h | 2 | ||||
-rw-r--r-- | main/channel.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 0ce88200a..88ba77dbc 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1060,7 +1060,7 @@ int ast_str2cause(const char *name) attribute_pure; * 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 */ /*! diff --git a/main/channel.c b/main/channel.c index ac59eb352..07d099c6a 100644 --- a/main/channel.c +++ b/main/channel.c @@ -516,8 +516,10 @@ int ast_str2cause(const char *name) 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; |