diff options
Diffstat (limited to 'src/charon/plugins/resolve')
-rw-r--r-- | src/charon/plugins/resolve/resolve_handler.c | 12 | ||||
-rw-r--r-- | src/charon/plugins/resolve/resolve_handler.h | 2 | ||||
-rw-r--r-- | src/charon/plugins/resolve/resolve_plugin.c | 5 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/charon/plugins/resolve/resolve_handler.c b/src/charon/plugins/resolve/resolve_handler.c index 86057ddbb..6f72546dd 100644 --- a/src/charon/plugins/resolve/resolve_handler.c +++ b/src/charon/plugins/resolve/resolve_handler.c @@ -46,7 +46,7 @@ struct private_resolve_handler_t { /** * Implementation of attribute_handler_t.handle */ -static bool handle(private_resolve_handler_t *this, ike_sa_t *ike_sa, +static bool handle(private_resolve_handler_t *this, identification_t *server, configuration_attribute_type_t type, chunk_t data) { FILE *in, *out; @@ -78,7 +78,7 @@ static bool handle(private_resolve_handler_t *this, ike_sa_t *ike_sa, { addr = host_create_from_chunk(family, data, 0); fprintf(out, "nameserver %H # by strongSwan, from %Y\n", - addr, ike_sa->get_other_id(ike_sa)); + addr, server); DBG1(DBG_IKE, "installing DNS server %H to %s", addr, this->file); addr->destroy(addr); handled = TRUE; @@ -106,7 +106,7 @@ static bool handle(private_resolve_handler_t *this, ike_sa_t *ike_sa, /** * Implementation of attribute_handler_t.release */ -static void release(private_resolve_handler_t *this, ike_sa_t *ike_sa, +static void release(private_resolve_handler_t *this, identification_t *server, configuration_attribute_type_t type, chunk_t data) { FILE *in, *out; @@ -139,7 +139,7 @@ static void release(private_resolve_handler_t *this, ike_sa_t *ike_sa, addr = host_create_from_chunk(family, data, 0); snprintf(matcher, sizeof(matcher), "nameserver %H # by strongSwan, from %Y\n", - addr, ike_sa->get_other_id(ike_sa)); + addr, server); /* copy all, but matching line */ while ((pos = fgets(line, sizeof(line), in))) @@ -179,8 +179,8 @@ resolve_handler_t *resolve_handler_create() { private_resolve_handler_t *this = malloc_thing(private_resolve_handler_t); - this->public.handler.handle = (bool(*)(attribute_handler_t*, ike_sa_t*, configuration_attribute_type_t, chunk_t))handle; - this->public.handler.release = (void(*)(attribute_handler_t*, ike_sa_t*, configuration_attribute_type_t, chunk_t))release; + this->public.handler.handle = (bool(*)(attribute_handler_t*, identification_t*, configuration_attribute_type_t, chunk_t))handle; + this->public.handler.release = (void(*)(attribute_handler_t*, identification_t*, configuration_attribute_type_t, chunk_t))release; this->public.destroy = (void(*)(resolve_handler_t*))destroy; this->mutex = mutex_create(MUTEX_TYPE_DEFAULT); diff --git a/src/charon/plugins/resolve/resolve_handler.h b/src/charon/plugins/resolve/resolve_handler.h index d56d06863..8a2c77f53 100644 --- a/src/charon/plugins/resolve/resolve_handler.h +++ b/src/charon/plugins/resolve/resolve_handler.h @@ -21,7 +21,7 @@ #ifndef RESOLVE_HANDLER_H_ #define RESOLVE_HANDLER_H_ -#include <config/attributes/attribute_handler.h> +#include <attributes/attribute_handler.h> typedef struct resolve_handler_t resolve_handler_t; diff --git a/src/charon/plugins/resolve/resolve_plugin.c b/src/charon/plugins/resolve/resolve_plugin.c index 63cd9af6d..c564981ef 100644 --- a/src/charon/plugins/resolve/resolve_plugin.c +++ b/src/charon/plugins/resolve/resolve_plugin.c @@ -41,8 +41,7 @@ struct private_resolve_plugin_t { */ static void destroy(private_resolve_plugin_t *this) { - charon->attributes->remove_handler(charon->attributes, - &this->handler->handler); + lib->attributes->remove_handler(lib->attributes, &this->handler->handler); this->handler->destroy(this->handler); free(this); } @@ -56,7 +55,7 @@ plugin_t *plugin_create() this->public.plugin.destroy = (void(*)(plugin_t*))destroy; this->handler = resolve_handler_create(); - charon->attributes->add_handler(charon->attributes, &this->handler->handler); + lib->attributes->add_handler(lib->attributes, &this->handler->handler); return &this->public.plugin; } |