Navigation


Changeset 1121:ccbd1426e04a in freeDiameter for libfdproto


Ignore:
Timestamp:
May 14, 2013, 4:27:28 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Improve testmesg_stress to measure impact of loaded dictionary

Location:
libfdproto
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/dictionary.c

    r1119 r1121  
    19091909        if (ret != 0) {
    19101910                char * buf = NULL;
    1911                 size_t len = 0;
    1912                
    1913                 CHECK_MALLOC( dict_obj_info[CHECK_TYPE(type) ? type : 0].dump_data(&buf, &len, NULL, data) );
     1911                size_t len = 0, offset=0;
     1912               
     1913                if (type == DICT_ENUMVAL) {
     1914                        CHECK_MALLOC( dump_enumval_data ( &buf, &len, &offset, data, parent->data.type.type_base ));
     1915                } else {
     1916                        CHECK_MALLOC( dict_obj_info[CHECK_TYPE(type) ? type : 0].dump_data(&buf, &len, &offset, data) );
     1917                }
     1918       
    19141919                TRACE_DEBUG(INFO, "An error occurred while adding the following data in the dictionary: %s", buf);
    19151920               
    19161921                if (ret == EEXIST) {
    1917                         CHECK_MALLOC( dump_object(&buf, &len, NULL, locref, 0, 0, 0) );
     1922                        offset=0;
     1923                        CHECK_MALLOC( dump_object(&buf, &len, &offset, locref, 0, 0, 0) );
    19181924                        TRACE_DEBUG(INFO, "Conflicting entry in the dictionary: %s", buf);
    19191925                }
  • libfdproto/messages.c

    r1120 r1121  
    885885                        while (inavp) {
    886886                                struct avp * nextavp = NULL;
    887                                 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL);
    888887                                CHECK_FCT_DO(  fd_msg_browse ( inavp, MSG_BRW_NEXT, &nextavp, NULL ), inavp = NULL  );
    889888                                CHECK_MALLOC_DO( avp_format_treeview(FD_DUMP_STD_PARAMS, inavp, level + 1, first, nextavp ? 0 : 1), return NULL);
Note: See TracChangeset for help on using the changeset viewer.