Review Board 1.7.16


use ie2str(full_ie) where possible in q931.c

Review Request #1633 - Created Dec. 18, 2011 and submitted

Alec Davis
1.4
Reviewers
asterisk-dev
rmudgett
LibPRI
compiles

Only 'dump_channel_id' left is.
basic calls.
adjust some output formatting as suggested.
Review request changed
Updated (Dec. 21, 2011, 1:42 p.m.)
  • 
    	  

    basic calls.
    adjust some output formatting as suggested.
As we're using the common dump_redirecting_number() for "Redirecting Number" and "Original Called Number", the strlen if the IE decsription is different, additional debug lines required different indentation for octets 3a and 3b.

Fix: use dynamic printf option '%-*c', by placing the 'prefix' at the far left of the padded string.

pri_message(ctrl, "%-*c Ext: %d  Presentation: %s (%d)",
   indent, prefix, ie->data[1] >> 7, pri_pres2str(ie->data[1] & 0x7f), ie->data[1] & 0x7f);


Posted (Dec. 21, 2011, 9:49 p.m.)

   

  
branches/1.4/q931.c (Diff revision 3)
 
 
see note below, regarding easier way to calculate 'indent' dynamically.
branches/1.4/q931.c (Diff revision 3)
 
 
There's an easier way to calc indent.

by using the printf %n option.

pri_message(ctrl, "%c %s (len=%2d) [ %nExt: %d.....", prefix, ie2str(full_ie), len, @indent,...

Ship it!
Posted (Jan. 9, 2012, 7:07 a.m.)
All still lokks good to me.

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.