[Asterisk-cvs] asterisk Makefile,1.93,1.94 config.c,1.20,1.21 pbx.c,1.124,1.125
markster at lists.digium.com
markster at lists.digium.com
Sat Jun 12 09:30:17 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv10931
Modified Files:
Makefile config.c pbx.c
Log Message:
Add "LOW_MEMORY" option and increase some buffer sizes (bug #1827)
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- Makefile 5 Jun 2004 06:54:52 -0000 1.93
+++ Makefile 12 Jun 2004 14:34:15 -0000 1.94
@@ -56,6 +56,10 @@
# will be received more reliably
#OPTIONS += -DRADIO_RELAX
+# If you don't have a lot of memory (e.g. embedded Asterisk), uncomment the
+# following to reduce the size of certain static buffers
+#OPTIONS += -DLOW_MEMORY
+
# Optional debugging parameters
DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
Index: config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/config.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- config.c 11 Jun 2004 00:12:35 -0000 1.20
+++ config.c 12 Jun 2004 14:34:15 -0000 1.21
@@ -529,7 +529,7 @@
if((c = strchr(cur,':'))) {
*c = '\0';
- *c++;
+ c++;
arg = c;
}
@@ -728,7 +728,7 @@
)
{
char fn[256];
- char buf[512];
+ char buf[8192];
FILE *f;
int lineno=0;
int master=0;
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- pbx.c 9 Jun 2004 01:45:07 -0000 1.124
+++ pbx.c 12 Jun 2004 14:34:15 -0000 1.125
@@ -49,6 +49,11 @@
*
*/
+#ifdef LOW_MEMORY
+#define EXT_DATA_SIZE 256
+#else
+#define EXT_DATA_SIZE 8192
+#endif
struct ast_context;
@@ -1159,11 +1164,11 @@
int res;
int status = 0;
char *incstack[AST_PBX_MAX_STACK];
- char passdata[256];
+ char passdata[EXT_DATA_SIZE];
int stacklen = 0;
char tmp[80];
char tmp2[80];
- char tmp3[256];
+ char tmp3[EXT_DATA_SIZE];
if (ast_mutex_lock(&conlock)) {
ast_log(LOG_WARNING, "Unable to obtain lock\n");
if ((action == HELPER_EXISTS) || (action == HELPER_CANMATCH) || (action == HELPER_MATCHMORE))
More information about the svn-commits
mailing list