[asterisk-dev] [Code Review] chan_dahdi: create and destroy channels at run-time

rmudgett reviewboard at asterisk.org
Wed Nov 30 19:12:48 CST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1598/#review4894
-----------------------------------------------------------


I suggest putting some kind of TODO comments in locations where things are not complete so you don't forget about them.  As you complete a TODO issue, delete it.  You are then done when there are no TODO comments left. :)

Please complete this patch before resubmitting for review.


/trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/1598/#comment9159>

    I would prefer doxygen comments for each member rather than a doxygen comment for a group.  Doxygen comments only associate with one member.



/trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/1598/#comment9156>

    Comment is no longer needed.



/trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/1598/#comment9155>

    Add a TODO note that these need to be executed for all function exit points or there will be a memory leak.



/trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/1598/#comment9154>

    [] spacing



/trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/1598/#comment9157>

    You should delay setting has_pseudo until the channel is actually created.  Otherwise, it might not actually be created.



/trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/1598/#comment9153>

    Add a TODO note here that a check is needed to know if this is a dahdi_create_channels() load or an initial load.



/trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/1598/#comment9158>

    Delay setting until the pseudo channel is actually created.


- rmudgett


On Nov. 30, 2011, 1:08 p.m., Tzafrir Cohen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1598/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2011, 1:08 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This code adds chan_dahdi the command 'dahdi create channels <range>' (where <range> is a single <n>-<m>) and updates 'dahdi destroy channel' with a similar 'dahdi destroy channels'.
> 
> 'dahdi create channels' acts as a filter for process_dahdi() and such in DAHDI: it re-parses the whole configuration, but only attempts to create channels in the range.
> 
> Right not this patch disables the initial probing at module load time (workaround: run 'dahdi create channels 1-10000' at startup through cli.conf). This is for debugging, mainly and should be removed later on.
> 
> This changeg is intended to provide a hook for a script running from udev once a span has been assigned ("registered") / unassigned ("unregistered") for its channels. The udev hook configures the span's channels with dahdi_cfg -S, and can then ask Asterisk to create ethe channels.
> 
> See: https://gitorious.org/~tzafrir/asterisk-tools/tzafrirs-dahdi-tools/commits/pinned-spans
> 
> This means that a separate DAHDI init script (running before the Asterisk one) would no longer be required. There is no longer a need to run a single command after all DAHDI devices are up.
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_dahdi.c 346465 
> 
> Diff: https://reviewboard.asterisk.org/r/1598/diff
> 
> 
> Testing
> -------
> 
> Works well with analog devices. Seems to work with ISDN ones as well. Not fully complete, though.
> 
> 
> Thanks,
> 
> Tzafrir
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111201/f6367360/attachment-0001.htm>


More information about the asterisk-dev mailing list