2017-08-16 13:58:12 +00:00
|
|
|
#include "gx_lib.h"
|
|
|
|
|
|
|
|
#define CHECK_dict_search( _type, _criteria, _what, _result ) \
|
|
|
|
CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
|
|
|
|
|
|
|
|
struct dict_object *gx_application = NULL;
|
|
|
|
|
2017-08-16 14:40:35 +00:00
|
|
|
struct dict_object *gx_cmd_ccr = NULL;
|
|
|
|
struct dict_object *gx_cmd_cca = NULL;
|
2017-08-13 04:44:23 +00:00
|
|
|
|
|
|
|
int gx_dict_init(void)
|
|
|
|
{
|
2017-08-16 13:58:12 +00:00
|
|
|
application_id_t id = 16777238;
|
|
|
|
|
|
|
|
CHECK_dict_search( DICT_APPLICATION, APPLICATION_BY_ID, (void *)&id, &gx_application);
|
|
|
|
|
|
|
|
CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Request", &gx_cmd_ccr);
|
|
|
|
CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Answer", &gx_cmd_cca);
|
|
|
|
|
2017-08-13 04:44:23 +00:00
|
|
|
return 0;
|
|
|
|
}
|