At 4:04 PM on 09 Jun 2010, Jonas Kellens wrote: > I have commented out case 5, case 2 and case 3, leaving case 1, > 4,6,7,8,9. > > But when I press "1" on the menu, I hear: " I'm sorry, I did not > understand your response"
Looks like someone broke the first rule of Optimization Club[1]. I
think you need to copy these two lines from case 5 into case 1:
cmd = vm_browse_messages(chan, &vms, vmu);
break;
It just so happens that cases 1 and 5 run the same command, so whoever
wrote it took advantage of that, optimizing the size of the binary
while reducing maintainability.
[1]
http://perlbuzz.com/mechanix/2008/02/the-rules-of-optimization-club.html
> if (play_auto) {
> cmd = '1';
> } else {
> cmd = vm_intro(chan, vmu, &vms);
> }
>
> vms.repeats = 0;
> vms.starting = 1;
> while ((cmd > -1) && (cmd != 't') && (cmd != '#')) {
> /* Run main menu */
> switch (cmd) {
> case '1':
> vms.curmsg = 0;
> /* Fall through */
> /* commented out from here
> case '5':
> cmd = vm_browse_messages(chan, &vms, vmu);
> break;
>
> <snip code>
>
> if (vms.repeats > 3)
> cmd = 't';
> }
> }
> if (cmd == 't') {
> cmd = 0;
> vms.repeats = 0;
> }
> break;
> commented out till here */
--
C. Chad Wallace, B.Sc.
The Lodging Company
http://www.lodgingcompany.com/
OpenPGP Public Key ID: 0x262208A0
signature.asc
Description: PGP signature
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
