I just had one question about "fd_sess_handler_create" function in freeDiameter library.
Well, in test_app extension, there is a ta_cli_init function to initialize the client procedure, this block was compiled fine when the code was in C :
int ta_cli_init(void)
{
CHECK_FCT( fd_sess_handler_create(&ta_cli_reg, (void*)free, NULL, NULL) );
CHECK_FCT( fd_event_trig_regcb(ta_conf->signal, "test_app.cli", ta_cli_test_message ) );
return 0;
}
However, as soon as i changed the code to C++ , the compiler started to nagging about "cleanup" parameter (second param) that I had to change the code to make the it compiled:
void sess_handler_free(struct sess_state * state, os0_t sid, void * opaque)
{
}
int ta_cli_init(void)
{
CHECK_FCT( fd_sess_handler_create(&ta_cli_reg, &sess_handler_free, NULL, NULL) );
CHECK_FCT( fd_event_trig_regcb(ta_conf->signal, "ocs_app.cli", ta_cli_test_message ) );
return 0;
}
The code is now can be compiled, but because i wasnt sure about cleanup context, as you see i left it empty.
Could you plz explain to me what exactly should be cleaned up in my custom sess_handler_free function body ?