@@ -943,9 +943,6 @@ void msaf_m1_state_functional(ogs_fsm_t *s, msaf_event_t *e)
943
943
944
944
ogs_debug ("GET metrics-reporting-configuration" );
945
945
946
- msaf_provisioning_session_t * msaf_provisioning_session ;
947
- msaf_provisioning_session = msaf_provisioning_session_find_by_provisioningSessionId (message -> h .resource .component [1 ]);
948
-
949
946
msaf_metrics_reporting_configuration_t * metricsReportingConfiguration ;
950
947
metricsReportingConfiguration = msaf_metrics_reporting_configuration_retrieve (msaf_provisioning_session , message -> h .resource .component [3 ]);
951
948
@@ -958,7 +955,6 @@ void msaf_m1_state_functional(ogs_fsm_t *s, msaf_event_t *e)
958
955
else {
959
956
cJSON * mrc_json_data = msaf_api_metrics_reporting_configuration_convertResponseToJSON (metricsReportingConfiguration -> config );
960
957
if (mrc_json_data ) {
961
-
962
958
char * metrics_response_body = cJSON_Print (mrc_json_data );
963
959
if (metrics_response_body ) {
964
960
ogs_debug ("Retrieved Metrics Reporting Configuration:\n%s" , metrics_response_body );
@@ -971,7 +967,6 @@ void msaf_m1_state_functional(ogs_fsm_t *s, msaf_event_t *e)
971
967
nf_server_populate_response (response , strlen (metrics_response_body ), metrics_response_body , 200 );
972
968
ogs_assert (true == ogs_sbi_server_send_response (stream , response ));
973
969
response = NULL ;
974
- cJSON_free (metrics_response_body );
975
970
cJSON_Delete (mrc_json_data );
976
971
}
977
972
else {
@@ -1613,9 +1608,6 @@ void msaf_m1_state_functional(ogs_fsm_t *s, msaf_event_t *e)
1613
1608
} else if (api == m1_metricsreportingprovisioning_api ) {
1614
1609
if (message -> h .resource .component [3 ] && !message -> h .resource .component [4 ]) {
1615
1610
1616
- msaf_provisioning_session_t * provisioning_session = NULL ;
1617
- provisioning_session = msaf_provisioning_session_find_by_provisioningSessionId (message -> h .resource .component [1 ]);
1618
-
1619
1611
if (msaf_delete_metrics_configuration (provisioning_session , message -> h .resource .component [3 ]) == 0 ) {
1620
1612
ogs_sbi_response_t * response ;
1621
1613
response = nf_server_new_response (NULL , "application/json" , 0 , NULL , 0 , NULL , m1_metricsreportingprovisioning_api , app_meta );
@@ -1777,6 +1769,12 @@ void msaf_m1_state_functional(ogs_fsm_t *s, msaf_event_t *e)
1777
1769
nf_server_populate_response (response , 0 , NULL , 204 );
1778
1770
ogs_assert (response );
1779
1771
ogs_assert (true == ogs_sbi_server_send_response (stream , response ));
1772
+ } else if (!strcmp (message -> h .resource .component [2 ], "metrics-reporting-configurations" )){
1773
+ methods = ogs_msprintf ("%s, %s, %s, %s, %s" , OGS_SBI_HTTP_METHOD_POST , OGS_SBI_HTTP_METHOD_GET , OGS_SBI_HTTP_METHOD_PUT , OGS_SBI_HTTP_METHOD_DELETE , OGS_SBI_HTTP_METHOD_OPTIONS );
1774
+ response = nf_server_new_response (request -> h .uri , NULL , 0 , NULL , 0 , methods , m1_metricsreportingprovisioning_api , app_meta );
1775
+ nf_server_populate_response (response , 0 , NULL , 204 );
1776
+ ogs_assert (response );
1777
+ ogs_assert (true == ogs_sbi_server_send_response (stream , response ));
1780
1778
} else if (!strcmp (message -> h .resource .component [2 ],"protocols" )) {
1781
1779
methods = ogs_msprintf ("%s, %s" , OGS_SBI_HTTP_METHOD_GET , OGS_SBI_HTTP_METHOD_OPTIONS );
1782
1780
response = nf_server_new_response (request -> h .uri , NULL , 0 , NULL , 0 , methods , m1_contentprotocolsdiscovery_api , app_meta );
0 commit comments