Navigation



Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/testmesg.c

    r1300 r1281  
    309309                        #endif
    310310                }
    311 
    312                 {
    313                         struct dict_object  * type = NULL;
    314                         struct dict_type_data type_data = { AVP_TYPE_OCTETSTRING, "OS test2", NULL, NULL, NULL, fd_dictfct_CharInOS_check, "@." };
    315                         struct dict_avp_data  avp_data = { 73575, 73565, "AVP Test - os2", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING };
    316                         CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) );
    317                         CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) );
    318                 }
    319                
    320311                #if 0
    321312                {
     
    762753                                /* reset */
    763754                                CHECK( 0, fd_msg_free ( msg ) );
    764                         }
    765                        
    766                         /* Test with a type verifier */
    767                         {
    768                                 struct fd_pei error_info;
    769                                 CPYBUF();
    770                                 buf_cpy[103] = 0x67;    /* Replaced AVP code = 0x00011F67, OS test2 type in the dictionary */
    771                                
    772                                 /* Check that we cannot support this message now */
    773                                 CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) );
    774                                 CHECK( EBADMSG, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) );
    775                                
    776                                 /* reset */
    777                                 CHECK( 0, fd_msg_free ( msg ) );
    778 
    779                                 CPYBUF();
    780                                 buf_cpy[103] = 0x67;    /* Replaced AVP code = 0x00011F67, OS test2 type in the dictionary */
    781                                
    782                                 /* Check error reporting works */
    783                                 CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) );
    784                                 CHECK( EBADMSG, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, &error_info ) );
    785                                
    786                                 #if 1
    787                                 fd_log_debug("Error reported: %s\n in AVP: %s", error_info.pei_message, fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, error_info.pei_avp, fd_g_config->cnf_dict, 0, 1));
    788                                 #endif
    789                                
    790                                 /* reset */
    791                                 CHECK( 0, fd_msg_free ( msg ) );
    792                                
    793                                 CPYBUF();
    794                                 buf_cpy[103] = 0x67;    /* Replaced AVP code = 0x00011F67, OS test2 type in the dictionary */
    795                                 buf_cpy[130] = '@';
    796                                 buf_cpy[140] = '.';     /* now we comply to the constraints */
    797                                
    798                                 /* Check that we cannot support this message now */
    799                                 CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) );
    800                                 CHECK( 0, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) );
    801                                
    802                                 /* reset */
    803                                 CHECK( 0, fd_msg_free ( msg ) );
    804                                
    805                                
    806755                        }
    807756                       
     
    14501399        }
    14511400       
     1401
    14521402        /* That's all for the tests yet */
    14531403        PASSTEST();
Note: See TracChangeset for help on using the changeset viewer.