Beispiel #1
0
static gboolean register_features(struct hdp_application *app,
						sdp_list_t **sup_features)
{
	sdp_list_t *hdp_feature;

	hdp_feature = app_to_sdplist(app);
	if (hdp_feature == NULL)
		goto fail;

	if (*sup_features == NULL) {
		*sup_features = sdp_list_append(NULL, hdp_feature);
		if (*sup_features == NULL)
			goto fail;
	} else if (sdp_list_append(*sup_features, hdp_feature) == NULL) {
		goto fail;
	}

	return TRUE;

fail:
	if (hdp_feature != NULL)
		sdp_list_free(hdp_feature, (sdp_free_func_t)sdp_data_free);
	if (*sup_features != NULL)
		sdp_list_free(*sup_features, free_hdp_list);
	return FALSE;
}
Beispiel #2
0
static gboolean register_features(struct mcap_application *app,
						sdp_list_t **sup_features)
{ DBG("");
	sdp_list_t *mcap_feature;

	mcap_feature = app_to_sdplist(app);
	if (!mcap_feature)
		goto fail;

	if (!*sup_features) {
		*sup_features = sdp_list_append(NULL, mcap_feature);
		if (!*sup_features)
			goto fail;
	} else if (!sdp_list_append(*sup_features, mcap_feature)) {
		goto fail;
	}

	return TRUE;

fail:
	if (mcap_feature)
		sdp_list_free(mcap_feature, (sdp_free_func_t)sdp_data_free);
	return FALSE;
}