[asterisk-commits] branch murf/AEL2 r8866 -
/team/murf/AEL2/pbx/pbx_ael2.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jan 31 14:20:27 MST 2006
Author: murf
Date: Sun Jan 29 16:27:15 2006
New Revision: 8866
URL: http://svn.digium.com/view/asterisk?rev=8866&view=rev
Log:
Reduced buffer sizes in gen_priors and other funcs, so that a
crash in "ael2 reload" doesn't occur, when calling for a reload
from a remote asterisk manager (asterisk -r). The crash hasn't been
occurring in the system console.
Modified:
team/murf/AEL2/pbx/pbx_ael2.c
Modified: team/murf/AEL2/pbx/pbx_ael2.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/pbx/pbx_ael2.c?rev=8866&r1=8865&r2=8866&view=diff
==============================================================================
--- team/murf/AEL2/pbx/pbx_ael2.c (original)
+++ team/murf/AEL2/pbx/pbx_ael2.c Sun Jan 29 16:27:15 2006
@@ -662,10 +662,10 @@
regex_t preg;
if ( pattern[0] == '_' ) {
- char reg1[5000];
+ char reg1[2000];
char *p,*r=reg1;
- if ( strlen(pattern)*5 >= 5000 ) /* safety valve */ {
+ if ( strlen(pattern)*5 >= 2000 ) /* safety valve */ {
ast_log(LOG_ERROR,"Error: The pattern %s is way too big. Pattern matching cancelled.\n",
pattern);
return 0;
@@ -2461,10 +2461,10 @@
#ifdef OLD_RAND_ACTION
struct ael_priority *rand_test, *rand_end, *rand_skip;
#endif
- char buf1[18000];
- char buf2[18000];
+ char buf1[2000];
+ char buf2[2000];
char *strp, *strp2;
- char new_label[18000];
+ char new_label[2000];
int default_exists;
struct ael_priority *loop_break_save;
struct ael_priority *loop_continue_save;
@@ -2703,7 +2703,7 @@
}
}
if (switch_case->return_needed) {
- char buf[18000];
+ char buf[2000];
struct ael_priority *np2 = new_prio();
np2->type = AEL_APPCALL;
np2->app = strdup("NoOp");
@@ -2763,7 +2763,7 @@
}
}
if (switch_case->return_needed) {
- char buf[18000];
+ char buf[2000];
struct ael_priority *np2 = new_prio();
np2->type = AEL_APPCALL;
np2->app = strdup("NoOp");
@@ -2825,7 +2825,7 @@
}
}
if (switch_case->return_needed) {
- char buf[18000];
+ char buf[2000];
struct ael_priority *np2 = new_prio();
np2->type = AEL_APPCALL;
np2->app = strdup("NoOp");
@@ -3061,7 +3061,7 @@
gen_prios(switch_case, new_label, p->u2.statements,mother_exten); /* this will link in all the catch body statements here */
if (switch_case->return_needed) {
- char buf[18000];
+ char buf[2000];
struct ael_priority *np2 = new_prio();
np2->type = AEL_APPCALL;
np2->app = strdup("NoOp");
@@ -3119,8 +3119,8 @@
}
for (pr=exten->plist; pr; pr=pr->next) {
- char app[18000];
- char appargs[18000];
+ char app[2000];
+ char appargs[2000];
/* before we can add the extension, we need to prep the app/appargs;
the CONTROL types need to be done after the priority numbers are calculated.
@@ -3208,7 +3208,7 @@
{
pval *p,*p2;
struct ast_context *context;
- char buf[18000];
+ char buf[2000];
struct ael_extension *exten;
for (p=root; p; p=p->next ) {
@@ -3254,7 +3254,7 @@
case PV_GLOBALS:
/* just VARDEC elements */
for (p2=p->u1.list; p2; p2=p2->next) {
- char buf2[18000];
+ char buf2[2000];
snprintf(buf2,sizeof(buf2),"%s=%s", p2->u1.str, p2->u2.val);
pbx_builtin_setvar(NULL, buf2);
}
More information about the asterisk-commits
mailing list