[asterisk-dev] [Code Review] Add a name to a sig_pri span
rmudgett at digium.com
rmudgett at digium.com
Tue Jul 27 15:05:19 CDT 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/800/#review2478
-----------------------------------------------------------
/trunk/channels/chan_dahdi.c
<https://reviewboard.asterisk.org/r/800/#comment5468>
For chan_dahdi, the name should be just "%d" so it could replace sig_pri_span.span entirely.
/trunk/channels/sig_pri.c
<https://reviewboard.asterisk.org/r/800/#comment5470>
I think the S in switching should still be capitalized.
/trunk/channels/sig_pri.c
<https://reviewboard.asterisk.org/r/800/#comment5471>
I think the U in unable should still be capitalized.
/trunk/channels/sig_pri.c
<https://reviewboard.asterisk.org/r/800/#comment5469>
For consistency should change to "Span: %s\n".
- rmudgett
On 2010-07-27 14:46:52, Tzafrir Cohen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/800/
> -----------------------------------------------------------
>
> (Updated 2010-07-27 14:46:52)
>
>
> Review request for Asterisk Developers and rmudgett.
>
>
> Summary
> -------
>
> sig_pri of chan_dahdi gives annoying messages such as:
>
> [Jul 25 20:58:14] WARNING[2289]: sig_pri.c:985 pri_find_dchan: No D-channels available. Using Primary channel as D-channel anyway.
> [Jul 25 20:58:14] WARNING[2290]: sig_pri.c:985 pri_find_dchan: No D-channels available. Using Primary channel as D-channel anyway.
> [Jul 25 20:58:14] WARNING[2287]: sig_pri.c:985 pri_find_dchan: No D-channels available. Using Primary channel as D-channel anyway.
> [Jul 25 20:58:14] WARNING[2288]: sig_pri.c:985 pri_find_dchan: No D-channels available. Using Primary channel as D-channel anyway.
>
> This change is intended to transform them to equally annoying and yet slightly more meaningful messages:
>
> [Jul 25 20:58:14] WARNING[2289]: sig_pri.c:985 pri_find_dchan: Span DAHDI/3: No D-channels available. Using Primary channel as D-channel anyway.
> [Jul 25 20:58:14] WARNING[2290]: sig_pri.c:985 pri_find_dchan: Span DAHDI/4: No D-channels available. Using Primary channel as D-channel anyway.
> [Jul 25 20:58:14] WARNING[2287]: sig_pri.c:985 pri_find_dchan: Span DAHDI/1: No D-channels available. Using Primary channel as D-channel anyway.
> [Jul 25 20:58:14] WARNING[2288]: sig_pri.c:985 pri_find_dchan: Span DAHDI/2: No D-channels available. Using Primary channel as D-channel anyway.
>
> As for the original issue, see https://issues.asterisk.org/view.php?id=17270 .
>
> This fix adds a field called 'name' to the struct sig_pri_span, and uses it when displaying span information, and also in that specific message as a demonstration.
>
> Note that the code in chan_dahdi.c:mkintf() at that point could use some indentation-level reduction as well at the same spot.
>
>
> Diffs
> -----
>
> /trunk/channels/chan_dahdi.c 279783
> /trunk/channels/sig_pri.h 279783
> /trunk/channels/sig_pri.c 279783
>
> Diff: https://reviewboard.asterisk.org/r/800/diff
>
>
> Testing
> -------
>
> Lightly tested loading, unloading and such.
>
>
> Thanks,
>
> Tzafrir
>
>
More information about the asterisk-dev
mailing list