From 0f2b43fddc18b301f3621a5e4314c0dcdb615eb1 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Sat, 5 Aug 2006 20:58:47 +0000 Subject: [PATCH] - add DIALING_OFFHOOK and PRERING to ast_state2str - don't include a newline character when building a response for an unknown state (issue #7645, jonty) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39032 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/channel.c b/channel.c index 8060bca859..972946690c 100644 --- a/channel.c +++ b/channel.c @@ -527,6 +527,10 @@ char *ast_state2str(int state) return "Up"; case AST_STATE_BUSY: return "Busy"; + case AST_STATE_DIALING_OFFHOOK: + return "Dialing Offhook"; + case AST_STATE_PRERING: + return "Pre-ring"; default: pthread_once(&state2str_buf_once, state2str_buf_key_create); if (!(buf = pthread_getspecific(state2str_buf_key))) { @@ -534,7 +538,7 @@ char *ast_state2str(int state) return NULL; pthread_setspecific(state2str_buf_key, buf); } - snprintf(buf, STATE2STR_BUFSIZE, "Unknown (%d)\n", state); + snprintf(buf, STATE2STR_BUFSIZE, "Unknown (%d)", state); return buf; } }