[asterisk-commits] russell: branch 1.6.0 r106308 - in /branches/1.6.0: ./ main/manager.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 5 18:15:30 CST 2008
Author: russell
Date: Wed Mar 5 18:15:30 2008
New Revision: 106308
URL: http://svn.digium.com/view/asterisk?view=rev&rev=106308
Log:
Merged revisions 105864 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r105864 | mmichelson | 2008-03-04 17:24:56 -0600 (Tue, 04 Mar 2008) | 5 lines
There are several places in manager.c where BUFSIZ is used for a buffer
which will contain nowhere near that amount of data. This makes these buffers
more reasonably sized.
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/main/manager.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Wed Mar 5 18:15:30 2008
@@ -1,1 +1,1 @@
-/trunk:1-105595,105675,105677,105733-105734,105773,105785,105804,105840-105841,106036,106040,106139
+/trunk:1-105595,105675,105677,105733-105734,105773,105785,105804,105840-105841,105864,106036,106040,106139
Modified: branches/1.6.0/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/manager.c?view=diff&rev=106308&r1=106307&r2=106308
==============================================================================
--- branches/1.6.0/main/manager.c (original)
+++ branches/1.6.0/main/manager.c Wed Mar 5 18:15:30 2008
@@ -1901,7 +1901,7 @@
/* XXX watch out, possible deadlock - we are trying to get two channels!!! */
chan = ast_get_channel_by_name_locked(name);
if (!chan) {
- char buf[BUFSIZ];
+ char buf[256];
snprintf(buf, sizeof(buf), "Channel does not exist: %s", name);
astman_send_error(s, m, buf);
return 0;
@@ -2554,12 +2554,12 @@
int res;
const char *module = astman_get_header(m, "Module");
const char *id = astman_get_header(m, "ActionID");
- char idText[BUFSIZ];
+ char idText[256];
const char *version;
- char filename[BUFSIZ/2];
+ char filename[PATH_MAX];
char *cut;
- snprintf(filename, sizeof(filename), module);
+ ast_copy_string(filename, module, sizeof(filename));
if ((cut = strchr(filename, '.'))) {
*cut = '\0';
} else {
@@ -2698,7 +2698,7 @@
AST_RWLIST_UNLOCK(&actions);
if (!tmp) {
- char buf[BUFSIZ];
+ char buf[512];
snprintf(buf, sizeof(buf), "Invalid/unknown command: %s. Use Action: ListCommands to show available commands.", action);
ast_mutex_lock(&s->__lock);
astman_send_error(s, m, buf);
@@ -3031,7 +3031,7 @@
static int manager_state_cb(char *context, char *exten, int state, void *data)
{
/* Notify managers of change */
- char hint[BUFSIZ];
+ char hint[512];
ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, context, exten);
manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nHint: %s\r\nStatus: %d\r\n", exten, context, hint, state);
More information about the asterisk-commits
mailing list