[asterisk-commits] murf: branch murf/bug_7638 r49217 - in
/team/murf/bug_7638: pbx/ utils/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jan 2 13:50:26 MST 2007
Author: murf
Date: Tue Jan 2 14:50:25 2007
New Revision: 49217
URL: http://svn.digium.com/view/asterisk?view=rev&rev=49217
Log:
A quick addition to add the statements in a extension. Way, way, way prototype. Needs a lot of detail work.
Modified:
team/murf/bug_7638/pbx/pbx_ael.c
team/murf/bug_7638/utils/conf2ael.c
Modified: team/murf/bug_7638/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/pbx/pbx_ael.c?view=diff&rev=49217&r1=49216&r2=49217
==============================================================================
--- team/murf/bug_7638/pbx/pbx_ael.c (original)
+++ team/murf/bug_7638/pbx/pbx_ael.c Tue Jan 2 14:50:25 2007
@@ -300,7 +300,7 @@
for (i=0; i<depth; i++) {
fprintf(fin,"\t"); /* depth == indentation */
}
- fprintf(fin,"};\n");
+ fprintf(fin,"}\n");
break;
case PV_VARDEC:
Modified: team/murf/bug_7638/utils/conf2ael.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/utils/conf2ael.c?view=diff&rev=49217&r1=49216&r2=49217
==============================================================================
--- team/murf/bug_7638/utils/conf2ael.c (original)
+++ team/murf/bug_7638/utils/conf2ael.c Tue Jan 2 14:50:25 2007
@@ -2831,15 +2831,40 @@
eroot=0;
while ( (eroot = ast_walk_context_extensions(tmp, eroot)) ) {
pval *exten = npval(PV_EXTENSION, 1,1,1,1);
- e = eroot;
-
tmptree->u2.statements = linku1(tmptree->u2.statements, exten);
- exten->u1.str = ast_strdup(tmp->name);
-
+ exten->u1.str = ast_strdup(eroot->exten);
+
+ if (eroot->peer) {
+ pval *block = npval(PV_STATEMENTBLOCK, 1,1,1,1);
+ exten->u2.statements = linku1(exten->u2.statements, block);
+
+ e = 0;
+ while ( (e = ast_walk_extension_priorities(eroot, e)) ) {
+ printf(" %s(%s)\n", e->app, (char*)e->data);
+
+ pval *statemnt = npval(PV_APPLICATION_CALL, 1,1,1,1);
+ pval *args = npval(PV_WORD, 1,1,1,1);
+
+ statemnt->u1.str = ast_strdup(e->app);
+ args->u1.str = ast_strdup(e->data);
+
+ block->u1.list = linku1(block->u1.list, statemnt);
+ statemnt->u2.arglist = linku1(statemnt->u2.arglist, args);
+ }
+ } else {
+ pval *statemnt = npval(PV_APPLICATION_CALL, 1,1,1,1);
+ pval *args = npval(PV_WORD, 1,1,1,1);
+ printf(" %s (%s)\n", eroot->app, (char *)eroot->data);
+
+ statemnt->u1.str = ast_strdup(eroot->app);
+ args->u1.str = ast_strdup(eroot->data);
+
+ exten->u2.statements = linku1(exten->u2.statements, statemnt);
+ statemnt->u2.arglist = linku1(statemnt->u2.arglist, args);
+ }
printf(" extension: %s\n", eroot->exten);
}
-
}
ael2_print("aelout.ael", tree);
More information about the asterisk-commits
mailing list