https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r84511 | murf | 2007-10-03 08:23:00 -0600 (Wed, 03 Oct 2007) | 1 line
closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
LOG: lev:3 file:pval.c line:669 func: check_macro_returns Warning: file ./extensions.ael, line 1-4: The macro endsess does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:669 func: check_macro_returns Warning: file ./extensions.ael, line 6-9: The macro nullchk does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:669 func: check_macro_returns Warning: file ./extensions.ael, line 11-26: The macro endcall does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 13-13: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:669 func: check_macro_returns Warning: file ./extensions.ael, line 28-44: The macro endcall2 does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 36-36: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:669 func: check_macro_returns Warning: file ./extensions.ael, line 46-68: The macro endcall3 does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 48-48: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 60-60: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:669 func: check_macro_returns Warning: file ./extensions.ael, line 70-96: The macro endcall4 does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 72-72: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 84-84: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 87-87: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:669 func: check_macro_returns Warning: file ./extensions.ael, line 98-131: The macro endcall5 does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 106-106: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 119-119: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2281 func: check_switch_expr Warning: file ./extensions.ael, line 122-122: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 1-4: The macro endsess does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 6-9: The macro nullchk does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 11-26: The macro endcall does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 13-13: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 28-44: The macro endcall2 does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 36-36: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 46-68: The macro endcall3 does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 48-48: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 60-60: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 70-96: The macro endcall4 does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 72-72: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 84-84: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 87-87: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 98-131: The macro endcall5 does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 106-106: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 119-119: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 122-122: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 2-16: The macro testdial does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 18-25: The macro exten-gen does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:1358 func: check_goto Warning: file ./extensions.ael, line 21-21: It's bad form to have a goto in a macro to a target outside the macro!
LOG: lev:3 file:pval.c line:1358 func: check_goto Warning: file ./extensions.ael, line 23-23: It's bad form to have a goto in a macro to a target outside the macro!
LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 58-58: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:918 func: check_dow Warning: file ./extensions.ael, line 67-67: The day (m0n) must be one of 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', or 'sat'!
LOG: lev:3 file:pval.c line:876 func: check_timerange Warning: file ./extensions.ael, line 78-78: The end time (25:00) is out of range!
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 2-16: The macro testdial does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 18-25: The macro exten-gen does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:1360 func: check_goto Warning: file ./extensions.ael, line 21-21: It's bad form to have a goto in a macro to a target outside the macro!
LOG: lev:3 file:pval.c line:1360 func: check_goto Warning: file ./extensions.ael, line 23-23: It's bad form to have a goto in a macro to a target outside the macro!
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 58-58: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:920 func: check_dow Warning: file ./extensions.ael, line 67-67: The day (m0n) must be one of 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', or 'sat'!
LOG: lev:3 file:pval.c line:878 func: check_timerange Warning: file ./extensions.ael, line 78-78: The end time (25:00) is out of range!
LOG: lev:3 file:pval.c line:2296 func: check_context_names Warning: file ./extensions.ael, line 49-62: The context name (incoming) is also declared in file ./extensions.ael, line 62-69!
LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 71-175: The macro std-priv-exten does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 245-246: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2422 func: check_pval_item Warning: file ./extensions.ael, line 312-312: macro call to non-existent funcA! (Not even in the extensions.conf stuff!)
LOG: lev:3 file:pval.c line:2422 func: check_pval_item Warning: file ./extensions.ael, line 313-313: macro call to non-existent funcD! (Not even in the extensions.conf stuff!)
LOG: lev:3 file:pval.c line:1342 func: check_goto Warning: file ./extensions.ael, line 319-319: goto: Couldn't find goto target test5|s|1, not even in extensions.conf!
LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 363-366: The macro dialoutpstn does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2298 func: check_context_names Warning: file ./extensions.ael, line 49-62: The context name (incoming) is also declared in file ./extensions.ael, line 62-69!
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 71-175: The macro std-priv-exten does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:2282 func: check_switch_expr Warning: file ./extensions.ael, line 245-246: A default case was automatically added to the switch.
LOG: lev:3 file:pval.c line:2424 func: check_pval_item Warning: file ./extensions.ael, line 312-312: macro call to non-existent funcA! (Not even in the extensions.conf stuff!)
LOG: lev:3 file:pval.c line:2424 func: check_pval_item Warning: file ./extensions.ael, line 313-313: macro call to non-existent funcD! (Not even in the extensions.conf stuff!)
LOG: lev:3 file:pval.c line:1344 func: check_goto Warning: file ./extensions.ael, line 319-319: goto: Couldn't find goto target test5|s|1, not even in extensions.conf!
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 363-366: The macro dialoutpstn does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:678 func: check_macro_returns Warning: file ./extensions.ael, line 130-183: The macro stdexten does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:678 func: check_macro_returns Warning: file ./extensions.ael, line 185-192: The macro uvm does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:678 func: check_macro_returns Warning: file ./extensions.ael, line 194-201: The macro bvm does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 130-183: The macro stdexten does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 185-192: The macro uvm does not end with a return; I will insert one.
LOG: lev:3 file:pval.c line:670 func: check_macro_returns Warning: file ./extensions.ael, line 194-201: The macro bvm does not end with a return; I will insert one.