Changeset 2720


Ignore:
Timestamp:
May 20, 2009 5:28:31 PM (10 years ago)
Author:
bennylp
Message:

Small enhancement (related to ticket #851): display the attribute value when dumping the STUN message for unknown attribute

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/sipit24/pjnath/src/pjnath/stun_msg_dump.c

    r2589 r2720  
    5858{ 
    5959    char *p = buffer, *end = buffer + length; 
     60    const char *attr_name = pj_stun_get_attr_name(ahdr->type); 
     61    char attr_buf[32]; 
    6062    int len; 
     63 
     64    if (*attr_name == '?') { 
     65        pj_ansi_snprintf(attr_buf, sizeof(attr_buf), "Attr 0x%x",  
     66                         ahdr->type); 
     67        attr_name = attr_buf; 
     68    } 
    6169 
    6270    len = pj_ansi_snprintf(p, end-p, 
    6371                           "  %s: length=%d", 
    64                            pj_stun_get_attr_name(ahdr->type), 
     72                           attr_name, 
    6573                           (int)ahdr->length); 
    6674    APPLY(); 
Note: See TracChangeset for help on using the changeset viewer.