Navigation


Changeset 1271:fd398055521c in freeDiameter for contrib


Ignore:
Timestamp:
May 21, 2014, 7:37:14 PM (10 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Remove some unused code. Fix loading message. Add dict_dcca_3gpp dependency.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/test_Gx/main_gx.c

    r1257 r1271  
    1414/* The content of this file follows the same structure as dict_base_proto.c */
    1515
     16#if 0
    1617#define CHECK_dict_new( _type, _data, _parent, _ref )  \
    1718       CHECK_FCT(  fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref))  );
    18 
    19 #define CHECK_dict_search( _type, _criteria, _what, _result )  \
    20        CHECK_FCT(  fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
     19#endif
    2120
    2221void dump_sess_eyec(struct session *sess, const char *);
    23 struct local_rules_definition {
    24        char                    *avp_name;
    25        enum rule_position      position;
    26        int                     min;
    27        int                     max;
    28 };
    29 
    30 #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 )
    31 
    32 #define PARSE_loc_rules( _rulearray, _parent) {                                                                \
    33        int __ar;                                                                                       \
    34        for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) {                     \
    35                struct dict_rule_data __data = { NULL,                                                  \
    36                        (_rulearray)[__ar].position,                                                    \
    37                        0,                                                                              \
    38                        (_rulearray)[__ar].min,                                                         \
    39                        (_rulearray)[__ar].max};                                                        \
    40                __data.rule_order = RULE_ORDER(__data.rule_position);                                   \
    41                CHECK_FCT(  fd_dict_search(                                                             \
    42                        fd_g_config->cnf_dict,                                                          \
    43                        DICT_AVP,                                                                       \
    44                        AVP_BY_NAME,                                                                    \
    45                        (_rulearray)[__ar].avp_name,                                                    \
    46                        &__data.rule_avp, 0 ) );                                                        \
    47                if ( !__data.rule_avp ) {                                                               \
    48                        TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name );         \
    49                        return ENOENT;                                                                  \
    50                }                                                                                       \
    51                CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL),   \
    52                        {                                                                               \
    53                                TRACE_DEBUG(INFO, "Error on rule with AVP '%s'",                        \
    54                                         (_rulearray)[__ar].avp_name );                                 \
    55                                return EINVAL;                                                          \
    56                        } );                                                                            \
    57        }                                                                                               \
    58 }
    59 
    60 #define enumval_def_u32( _val_, _str_ ) \
    61                { _str_,                { .u32 = _val_ }}
    62 
    63 #define enumval_def_os( _len_, _val_, _str_ ) \
    64                { _str_,                { .os = { .data = (unsigned char *)_val_, .len = _len_ }}}
    65 
    66 
    67  
     22
    6823static int ccr_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act);
    6924static int reauth_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act);
     
    288243
    289244
    290        TRACE_DEBUG(INFO, "Extension 'Dictionary definitions for DCCA (rfc4006)' initialized");
     245       TRACE_DEBUG(INFO, "Extension 'Gx' initialized");
    291246       return 0;
    292247}
     
    861816 return 0;
    862817}
    863 EXTENSION_ENTRY( "app_gx", app_gx_entry, "dict_dcca");
     818EXTENSION_ENTRY( "app_gx", app_gx_entry, "dict_dcca_3gpp");
    864819//EXTENSION_ENTRY( "app_gx", gx_entry);
Note: See TracChangeset for help on using the changeset viewer.