mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 18:38:02 +00:00
Add "LOW_MEMORY" option and increase some buffer sizes (bug #1827)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
Makefile
4
Makefile
@@ -56,6 +56,10 @@ DEBUG=-g #-pg
|
|||||||
# will be received more reliably
|
# will be received more reliably
|
||||||
#OPTIONS += -DRADIO_RELAX
|
#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
|
# Optional debugging parameters
|
||||||
DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
|
DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
|
||||||
|
|
||||||
|
|||||||
4
config.c
4
config.c
@@ -529,7 +529,7 @@ static int cfg_process(struct ast_config *tmp, struct ast_category **_tmpc, stru
|
|||||||
|
|
||||||
if((c = strchr(cur,':'))) {
|
if((c = strchr(cur,':'))) {
|
||||||
*c = '\0';
|
*c = '\0';
|
||||||
*c++;
|
c++;
|
||||||
arg = c;
|
arg = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -728,7 +728,7 @@ static struct ast_config *__ast_load(char *configfile, struct ast_config *tmp, s
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
char fn[256];
|
char fn[256];
|
||||||
char buf[512];
|
char buf[8192];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int lineno=0;
|
int lineno=0;
|
||||||
int master=0;
|
int master=0;
|
||||||
|
|||||||
9
pbx.c
9
pbx.c
@@ -49,6 +49,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef LOW_MEMORY
|
||||||
|
#define EXT_DATA_SIZE 256
|
||||||
|
#else
|
||||||
|
#define EXT_DATA_SIZE 8192
|
||||||
|
#endif
|
||||||
|
|
||||||
struct ast_context;
|
struct ast_context;
|
||||||
|
|
||||||
@@ -1159,11 +1164,11 @@ static int pbx_extension_helper(struct ast_channel *c, char *context, char *exte
|
|||||||
int res;
|
int res;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
char *incstack[AST_PBX_MAX_STACK];
|
char *incstack[AST_PBX_MAX_STACK];
|
||||||
char passdata[256];
|
char passdata[EXT_DATA_SIZE];
|
||||||
int stacklen = 0;
|
int stacklen = 0;
|
||||||
char tmp[80];
|
char tmp[80];
|
||||||
char tmp2[80];
|
char tmp2[80];
|
||||||
char tmp3[256];
|
char tmp3[EXT_DATA_SIZE];
|
||||||
if (ast_mutex_lock(&conlock)) {
|
if (ast_mutex_lock(&conlock)) {
|
||||||
ast_log(LOG_WARNING, "Unable to obtain lock\n");
|
ast_log(LOG_WARNING, "Unable to obtain lock\n");
|
||||||
if ((action == HELPER_EXISTS) || (action == HELPER_CANMATCH) || (action == HELPER_MATCHMORE))
|
if ((action == HELPER_EXISTS) || (action == HELPER_CANMATCH) || (action == HELPER_MATCHMORE))
|
||||||
|
|||||||
Reference in New Issue
Block a user