static void _linphone_call_params_destroy(LinphoneCallParams *cp){ unsigned int i; if (cp->record_file) ms_free(cp->record_file); if (cp->custom_headers) sal_custom_header_free(cp->custom_headers); if (cp->custom_sdp_attributes) sal_custom_sdp_attribute_free(cp->custom_sdp_attributes); for (i = 0; i < (unsigned int)LinphoneStreamTypeUnknown; i++) { if (cp->custom_sdp_media_attributes[i]) sal_custom_sdp_attribute_free(cp->custom_sdp_media_attributes[i]); } if (cp->session_name) ms_free(cp->session_name); }
static void sal_media_description_destroy(SalMediaDescription *md){ int i; for(i=0;i<SAL_MEDIA_DESCRIPTION_MAX_STREAMS;i++){ ms_list_free_with_data(md->streams[i].payloads,(void (*)(void *))payload_type_destroy); ms_list_free_with_data(md->streams[i].already_assigned_payloads,(void (*)(void *))payload_type_destroy); md->streams[i].payloads=NULL; md->streams[i].already_assigned_payloads=NULL; sal_custom_sdp_attribute_free(md->streams[i].custom_sdp_attributes); } sal_custom_sdp_attribute_free(md->custom_sdp_attributes); ms_free(md); }
void linphone_call_params_set_custom_sdp_media_attributes(LinphoneCallParams *params, LinphoneStreamType type, const SalCustomSdpAttribute *csa) { if (params->custom_sdp_media_attributes[type]) { sal_custom_sdp_attribute_free(params->custom_sdp_media_attributes[type]); params->custom_sdp_media_attributes[type] = NULL; } if (csa) { params->custom_sdp_media_attributes[type] = sal_custom_sdp_attribute_clone(csa); } }
void linphone_call_params_set_custom_sdp_attributes(LinphoneCallParams *params, const SalCustomSdpAttribute *csa) { if (params->custom_sdp_attributes) { sal_custom_sdp_attribute_free(params->custom_sdp_attributes); params->custom_sdp_attributes = NULL; } if (csa) { params->custom_sdp_attributes = sal_custom_sdp_attribute_clone(csa); } }