From 5589a1e3878ed256ad36add260cb50f26994261c Mon Sep 17 00:00:00 2001
From: Russell Bryant <russell@russellbryant.com>
Date: Wed, 20 Jul 2005 16:39:49 +0000
Subject: [PATCH] put ast_recvchar under its desc, add desc for ast_senddigit,
 don't use a length limited copy for a static copy into a buffer that we
 *know* is big enough

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channel.c                  |  6 +++---
 include/asterisk/channel.h | 10 ++++++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/channel.c b/channel.c
index c2e4a77cf6..71c6c85812 100755
--- a/channel.c
+++ b/channel.c
@@ -521,7 +521,7 @@ struct ast_channel *ast_channel_alloc(int needqueue)
 	tmp->fds[AST_MAX_FDS-1] = tmp->alertpipe[0];
 	/* And timing pipe */
 	tmp->fds[AST_MAX_FDS-2] = tmp->timingfd;
-	ast_copy_string(tmp->name, "**Unknown**", sizeof(tmp->name));
+	strcpy(tmp->name, "**Unkown**");
 	/* Initial state */
 	tmp->_state = AST_STATE_DOWN;
 	tmp->streamid = -1;
@@ -533,9 +533,9 @@ struct ast_channel *ast_channel_alloc(int needqueue)
 	headp = &tmp->varshead;
 	ast_mutex_init(&tmp->lock);
 	AST_LIST_HEAD_INIT(headp);
-	ast_copy_string(tmp->context, "default", sizeof(tmp->context));
+	strcpy(tmp->context, "default");
 	ast_copy_string(tmp->language, defaultlanguage, sizeof(tmp->language));
-	ast_copy_string(tmp->exten, "s", sizeof(tmp->exten));
+	strcpy(tmp->exten, "s");
 	tmp->priority = 1;
 	tmp->amaflags = ast_default_amaflags;
 	ast_copy_string(tmp->accountcode, ast_default_accountcode, sizeof(tmp->accountcode));
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 9dd312466e..67b0a54010 100755
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -703,11 +703,17 @@ int ast_sendtext(struct ast_channel *chan, char *text);
  * Read a char of text from a channel
  * Returns 0 on success, -1 on failure
  */
+int ast_recvchar(struct ast_channel *chan, int timeout);
 
+/*! Send a DTMF digit to a channel */
+/*! 
+ * \param chan channel to act upon
+ * \param digit the DTMF digit to send, encoded in ASCII
+ * Send a DTMF digit to a channel.
+ * Returns 0 on success, -1 on failure
+ */
 int ast_senddigit(struct ast_channel *chan, char digit);
 
-int ast_recvchar(struct ast_channel *chan, int timeout);
-
 /*! Receives a text string from a channel */
 /*! 
  * \param chan channel to act upon
-- 
GitLab