Posted: Mon May 04, 2009 10:08 pm Post subject: [asterisk-dev] [Code Review] INCrement DECrement functionali
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/243/#review765
-----------------------------------------------------------
I cannot view the diff.
- Tilghman
On 2009-05-04 04:00:15, greenfieldtech wrote:
Quote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/243/
-----------------------------------------------------------
(Updated 2009-05-04 04:00:15)
Review request for Asterisk Developers.
Summary
-------
Over the course of time, developing Asterisk dialplans becomes fairly cumbersome, especially when writing While() loops in the dialplan. Mainly, when we want to iterate a few times, the ever annoying Set(Var=$[${Var} + 1]) is really annoying.
INCrement and DECrement follow the old PASCAL functions, allowing to increment and decrement a variable.
The functions are built to handle both numeric and alpha-numeric values. If an alpha-numeric value is given, the functions will simply bail out and issue a LOG_NOTICE accordingly.
In order to implement this, i've added some functionality to func_math.c and added a new ast_is_numeric function to strings.h
Please find attached patches for TRUNK under bug tracker issue 15025.
For some reason, the post-review script doesn't work (kpf is aware of the issue).
Posted: Tue May 05, 2009 12:47 am Post subject: [asterisk-dev] [Code Review] INCrement DECrement functionali
On May 5, 2009, at 12:49 AM, Tilghman Lesher wrote:
Quote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/243/#review765
-----------------------------------------------------------
I cannot view the diff.
I would actually prefer that this patch just go on Mantis, instead of
straight to reviewboard - bugs.digium.com.
--
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Tue May 05, 2009 8:34 am Post subject: [asterisk-dev] [Code Review] INCrement DECrement functionali
Hi Tilghman,
I know you can't, there is a problem with the post-review script. The patch is on the tracker, per KPF's recommendation.
Nir S
On Tue, May 5, 2009 at 1:49 AM, Tilghman Lesher <tlesher@digium.com (tlesher@digium.com)> wrote:
Quote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/243/#review765
-----------------------------------------------------------
I cannot view the diff.
- Tilghman
On 2009-05-04 04:00:15, greenfieldtech wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/243/
> -----------------------------------------------------------
>
> (Updated 2009-05-04 04:00:15)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Over the course of time, developing Asterisk dialplans becomes fairly cumbersome, especially when writing While() loops in the dialplan. Mainly, when we want to iterate a few times, the ever annoying Set(Var=$[${Var} + 1]) is really annoying.
> INCrement and DECrement follow the old PASCAL functions, allowing to increment and decrement a variable.
>
> The functions are built to handle both numeric and alpha-numeric values. If an alpha-numeric value is given, the functions will simply bail out and issue a LOG_NOTICE accordingly.
>
> In order to implement this, i've added some functionality to func_math.c and added a new ast_is_numeric function to strings.h
>
> Please find attached patches for TRUNK under bug tracker issue 15025.
>
> For some reason, the post-review script doesn't work (kpf is aware of the issue).
>
>
> This addresses bug N/A.
> http://bugs.digium.com/view.php?id=N/A
>
>
> Diffs
> -----
>
> /funcs/funcs/func_math.c 191953
>
> Diff: http://reviewboard.digium.com/r/243/diff
>
>
> Testing
> -------
>
> The below dialplan illustrates the usage of these functions within a dialplan:
>
> [incdec]
> exten => _X.,1,Answer
> exten => _X.,n,Wait(1)
> exten => _X.,n,Set(MyVar=10)
> exten => _X.,n,Noop(${INC(MyVar)})
> exten => _X.,n,Noop(MyVAR is Now: ${MyVar})
> exten => _X.,n,Noop(${DEC(MyVar)})
> exten => _X.,n,Noop(MyVAR is Now: ${MyVar})
> exten => _X.,n,While($[DEC(MyVar) > 0])
> exten => _X.,n,Noop(MyVAR is Now: ${MyVar})
> exten => _X.,n,EndWhile
> exten => _X.,n,Noop(${INC(NoVar)})
> exten => _X.,n,Set(NewVar=ab)
> exten => _X.,n,Noop(${INC(NewVar)})
> exten => _X.,n,Noop(NewVAR is Now: ${NewVar})
>
>
> Screenshots
> -----------
>
> INC and DEC running
> http://reviewboard.digium.com/r/243/s/1/
>
>
> Thanks,
>
> greenfieldtech
>
>
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Tue May 05, 2009 1:48 pm Post subject: [asterisk-dev] [Code Review] INCrement DECrement functionali
On Monday 04 May 2009 20:35:22 Russell Bryant wrote:
Quote:
On May 5, 2009, at 12:49 AM, Tilghman Lesher wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/243/#review765
> -----------------------------------------------------------
>
>
> I cannot view the diff.
I would actually prefer that this patch just go on Mantis, instead of
straight to reviewboard - bugs.digium.com.
I recommended that he put it on reviewboard, so I could do an in-depth
review.
--
Tilghman
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Tue May 05, 2009 2:03 pm Post subject: [asterisk-dev] [Code Review] INCrement DECrement functionali
On May 5, 2009, at 4:37 PM, Tilghman Lesher wrote:
Quote:
On Monday 04 May 2009 20:35:22 Russell Bryant wrote:
> On May 5, 2009, at 12:49 AM, Tilghman Lesher wrote:
>> -----------------------------------------------------------
>> This is an automatically generated e-mail. To reply, visit:
>> http://reviewboard.digium.com/r/243/#review765
>> -----------------------------------------------------------
>>
>>
>> I cannot view the diff.
>
> I would actually prefer that this patch just go on Mantis, instead of
> straight to reviewboard - bugs.digium.com.
I recommended that he put it on reviewboard, so I could do an in-depth
review.
Ah, okay. I think it'll have to get re-posted, then. I had closed it
because I didn't know it was on Mantis already.
--
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Tue May 05, 2009 2:36 pm Post subject: [asterisk-dev] [Code Review] INCrement DECrement functionali
Russell Bryant wrote:
Quote:
On May 5, 2009, at 4:37 PM, Tilghman Lesher wrote:
> On Monday 04 May 2009 20:35:22 Russell Bryant wrote:
>
>> On May 5, 2009, at 12:49 AM, Tilghman Lesher wrote:
>>
>>> -----------------------------------------------------------
>>> This is an automatically generated e-mail. To reply, visit:
>>> http://reviewboard.digium.com/r/243/#review765
>>> -----------------------------------------------------------
>>>
>>>
>>> I cannot view the diff.
>>>
>> I would actually prefer that this patch just go on Mantis, instead of
>> straight to reviewboard - bugs.digium.com.
>>
> I recommended that he put it on reviewboard, so I could do an in-depth
> review.
>
Ah, okay. I think it'll have to get re-posted, then. I had closed it
because I didn't know it was on Mantis already.
--
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum