Navigation


Changeset 1088:1d1a20a0779d in freeDiameter for tests/testmesg.c


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

Second part of changeset 1083, now the code compiles again. Still missing some functions implementation, though

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/testmesg.c

    r1047 r1088  
    6161                #if 0
    6262                /* For debug: dump the object */
    63                 fd_log_debug("Dumping Accounting-Request empty message");
    64                 fd_msg_dump_walk( 0, acr );
     63                fd_log_debug("Dumping Accounting-Request empty message:");
     64                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, acr, fd_g_config->cnf_dict, 0, 1));
    6565                #endif
    6666        }
     
    7979                /* For debug: dump the object */
    8080                fd_log_debug("Dumping Proxy-Info AVP");
    81                 fd_msg_dump_walk(0, pi);
     81                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, pi, fd_g_config->cnf_dict, 0, 1));
    8282                fd_log_debug("Dumping dictionary model");
    83                 fd_dict_dump_object(pi_model);
     83                fd_log_debug("%s", fd_dict_dump_object(FD_DUMP_TEST_PARAMS, pi_model));
    8484                #endif
    8585               
     
    107107                /* For debug: dump the object */
    108108                fd_log_debug("Dumping Accounting-Request with Proxy-Info AVP at the end");
    109                 fd_msg_dump_walk(0, acr);
     109                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, acr, fd_g_config->cnf_dict, 0, 1));
    110110                #endif
    111111        }
     
    306306                                                */
    307307                        #if 0
    308                         fd_dict_dump_object ( gavp );
     308                        fd_log_debug("%s", fd_dict_dump_object(FD_DUMP_TEST_PARAMS, gavp));
    309309                        #endif
    310310                }
    311311                #if 0
    312312                {
    313                         fd_dict_dump_object ( vendor );
     313                        fd_log_debug("%s", fd_dict_dump_object(FD_DUMP_TEST_PARAMS, vendor));
    314314                }
    315315                #endif
     
    365365                        #if 0
    366366                        fd_log_debug("AVP no vendor, value 3.1415:");
    367                         fd_msg_dump_one(0, avpi);
     367                        fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0));
    368368                        #endif
    369369                        CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) );
     
    382382                        #if 0
    383383                        fd_log_debug("AVP vendor, value 0x123456789abcdeL:");
    384                         fd_msg_dump_one(0, avpi);
     384                        fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0));
    385385                        #endif
    386386                        CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) );
     
    408408                                #if 0
    409409                                fd_log_debug("AVP enum i32, value 2 (from const):");
    410                                 fd_msg_dump_one(0, avpi);
     410                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0));
    411411                                #endif
    412412                        }
     
    429429                                #if 0
    430430                                fd_log_debug("AVP enum i32, value -5 (from const):");
    431                                 fd_msg_dump_one(0, avpi);
     431                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0));
    432432                                #endif
    433433                                /* Check the size is correct ( 12 for header + 4 for value ) */
     
    444444                        #if 0
    445445                        fd_log_debug("AVP vendor enum i32, value -10 (not const):");
    446                         fd_msg_dump_one(0, avpi);
     446                        fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0));
    447447                        #endif
    448448                       
     
    459459                                #if 0
    460460                                fd_log_debug("AVP octet string, 'This\\0 is a b...'");
    461                                 fd_msg_dump_one(0, avpi);
     461                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0));
    462462                                #endif
    463463                                CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) );
     
    488488                                #if 0
    489489                                fd_log_debug("AVP Enumuerated OctetString (from const):");
    490                                 fd_msg_dump_one(0, avpi);
     490                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0));
    491491                                #endif
    492492                                /* Check the size is correct ( 12 for header + 5 for value ) */
     
    513513                                #if 0
    514514                                fd_log_debug("AVP Enumuerated OctetString (from const):");
    515                                 fd_msg_dump_one(0, avpi);
     515                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0));
    516516                                #endif
    517517                                /* Check the size is correct ( 12 for header + 3 for value ) */
     
    535535                                #if 0
    536536                                fd_log_debug("AVP octet string, '1234678'");
    537                                 fd_msg_dump_one(0, avpch);
     537                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpch, fd_g_config->cnf_dict, 0, 0));
    538538                                #endif
    539539                                CHECK( 0, fd_msg_update_length ( avpch ) );
     
    548548                                #if 0
    549549                                fd_log_debug("AVP octet string, '12346789'");
    550                                 fd_msg_dump_one(0, avpch);
     550                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpch, fd_g_config->cnf_dict, 0, 0));
    551551                                #endif
    552552                          }
     
    580580                        CHECK( 0, fd_msg_update_length ( msg ) );
    581581                        #if 0
    582                         fd_msg_dump_walk(0, msg);
     582                        fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1));
    583583                        #endif
    584584                        CHECK( 344, msgdata->msg_length );
     
    660660                        CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) );
    661661                        #if 0
    662                         fd_msg_dump_walk(0, msg);
     662                        fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1));
    663663                        #endif
    664664                       
     
    733733                               
    734734                                #if 0
    735                                 fd_msg_dump_walk(0, msg);
     735                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1));
    736736                                #endif
    737737                               
     
    769769                                CHECK( 0, fd_msg_bufferize( msg, &buftmp, NULL ) );                             
    770770                               
    771                                 fd_msg_dump_walk(0, msg);
     771                                fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1));
    772772                               
    773773                                TODO("Check the Failed-AVP is as expected");
     
    783783                        CHECK( 0, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) );
    784784                        #if 0
    785                         fd_msg_dump_walk(0, msg);
     785                        fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1));
    786786                        #endif
    787787                }
     
    13361336                        /* Okay, now delete the message and parse the buffer, then check we obtain the same values back */
    13371337                        #if 0
    1338                         fd_msg_dump_walk(0, msg);
     1338                        fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1));
    13391339                        #endif
    13401340                        CHECK( 0, fd_msg_free( msg ) );
     
    13431343                        CHECK( 0, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) );
    13441344                        #if 0
    1345                         fd_msg_dump_walk(0, msg);
     1345                        fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1));
    13461346                        #endif
    13471347                       
Note: See TracChangeset for help on using the changeset viewer.