Revision b5a2055f src/charon/sa/ike_sa.c

b/src/charon/sa/ike_sa.c
1843 1843
 * Implementation of ike_sa_t.add_configuration_attribute
1844 1844
 */
1845 1845
static void add_configuration_attribute(private_ike_sa_t *this,
1846
							attribute_handler_t *handler,
1846 1847
							configuration_attribute_type_t type, chunk_t data)
1847 1848
{
1848
	attribute_entry_t *entry;
1849
	attribute_handler_t *handler;
1849
	attribute_entry_t *entry = malloc_thing(attribute_entry_t);
1850 1850

  
1851
	handler = lib->attributes->handle(lib->attributes, this->other_id,
1852
									  type, data);
1853
	if (handler)
1854
	{
1855
		entry = malloc_thing(attribute_entry_t);
1856
		entry->handler = handler;
1857
		entry->type = type;
1858
		entry->data = chunk_clone(data);
1851
	entry->handler = handler;
1852
	entry->type = type;
1853
	entry->data = chunk_clone(data);
1859 1854

  
1860
		this->attributes->insert_last(this->attributes, entry);
1861
	}
1855
	this->attributes->insert_last(this->attributes, entry);
1862 1856
}
1863 1857

  
1864 1858
/**
......
2091 2085
	this->public.get_unique_id = (u_int32_t (*)(ike_sa_t*))get_unique_id;
2092 2086
	this->public.set_virtual_ip = (void (*)(ike_sa_t*,bool,host_t*))set_virtual_ip;
2093 2087
	this->public.get_virtual_ip = (host_t* (*)(ike_sa_t*,bool))get_virtual_ip;
2094
	this->public.add_configuration_attribute = (void(*)(ike_sa_t*, configuration_attribute_type_t type, chunk_t data))add_configuration_attribute;
2088
	this->public.add_configuration_attribute = (void(*)(ike_sa_t*, attribute_handler_t *handler,configuration_attribute_type_t type, chunk_t data))add_configuration_attribute;
2095 2089
	this->public.set_kmaddress = (void (*)(ike_sa_t*,host_t*,host_t*))set_kmaddress;
2096 2090
#ifdef ME
2097 2091
	this->public.act_as_mediation_server = (void (*)(ike_sa_t*)) act_as_mediation_server;

Also available in: Unified diff