2017-08-22 15:51:57 +00:00
|
|
|
#define TRACE_MODULE _pcrf_fd_path
|
2017-08-17 05:15:08 +00:00
|
|
|
|
|
|
|
#include "core_debug.h"
|
|
|
|
|
2018-01-04 11:38:22 +00:00
|
|
|
#include "fd/fd_lib.h"
|
2017-08-17 05:15:08 +00:00
|
|
|
|
|
|
|
#include "pcrf_context.h"
|
2018-01-08 09:34:51 +00:00
|
|
|
#include "pcrf_fd_path.h"
|
2018-01-04 03:57:00 +00:00
|
|
|
|
2018-01-10 03:45:58 +00:00
|
|
|
status_t pcrf_fd_init(void)
|
2017-08-17 05:15:08 +00:00
|
|
|
{
|
2018-01-10 03:45:58 +00:00
|
|
|
status_t rv;
|
|
|
|
int ret = fd_init(FD_MODE_CLIENT|FD_MODE_SERVER,
|
|
|
|
pcrf_self()->fd_conf_path, pcrf_self()->fd_config);
|
|
|
|
d_assert(ret == 0, return CORE_ERROR,);
|
2017-08-17 05:15:08 +00:00
|
|
|
|
2018-01-10 03:45:58 +00:00
|
|
|
rv = pcrf_gx_init();
|
|
|
|
d_assert(rv == CORE_OK, return CORE_ERROR,);
|
|
|
|
rv = pcrf_rx_init();
|
|
|
|
d_assert(rv == CORE_OK, return CORE_ERROR,);
|
2018-01-04 03:57:00 +00:00
|
|
|
|
2018-01-10 03:45:58 +00:00
|
|
|
return CORE_OK;
|
2017-08-17 05:15:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-22 15:51:57 +00:00
|
|
|
void pcrf_fd_final(void)
|
2017-08-17 05:15:08 +00:00
|
|
|
{
|
2018-01-08 09:34:51 +00:00
|
|
|
pcrf_gx_final();
|
|
|
|
pcrf_rx_final();
|
2018-01-04 03:57:00 +00:00
|
|
|
|
2017-08-17 05:15:08 +00:00
|
|
|
fd_final();
|
|
|
|
}
|