[asterisk-dev] [Code Review] Add a name to a sig_pri span

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Jul 27 14:46:52 CDT 2010


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

(Updated 2010-07-27 14:46:52.009276)


Review request for Asterisk Developers and rmudgett.


Changes
-------

Addresses rmugget's comments.


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 (updated)
-----

  /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