Commit 2b893e46 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

Fix memory leak and add some documentation in qos analyzer

parent 322600a8
......@@ -110,7 +110,17 @@ struct _MSQosAnalyzer{
MSQosAnalyzerDesc *desc;
OrtpLossRateEstimator *lre;
char *label;
void (*on_action_suggested)(void*, int, const char**);
* Each time the algorithm suggest an action, this callback is called with the userpointer
* @param userpointer on_action_suggested_user_pointer pointer given
* @param argc number of arguments on the third argument array
* @param argv array containing various algorithm dependent information
void (*on_action_suggested)(void* userpointer, int argc, const char** argv);
* User pointer used in #on_action_suggested . Be careful: This pointer is
* automatically freed by the QosAnalyzer on change or on destroy
void *on_action_suggested_user_pointer;
int refcnt;
MSQosAnalyzerAlgorithm type;
......@@ -100,6 +100,8 @@ void ms_qos_analyzer_unref(MSQosAnalyzer *obj){
if (obj->label) ms_free(obj->label);
if (obj->lre) ortp_loss_rate_estimator_destroy(obj->lre);
if (obj->on_action_suggested_user_pointer) ms_free(obj->on_action_suggested_user_pointer);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment