From: Martin Willi Date: Thu, 27 Jun 2013 08:16:00 +0000 (+0200) Subject: stream: create library instance of stream-manager X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0e6cedc0ed4589b2932d654e5c2b40ccae9ca1c;p=thirdparty%2Fstrongswan.git stream: create library instance of stream-manager --- diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c index 35d74200c3..f2fa3e0aa2 100644 --- a/src/libstrongswan/library.c +++ b/src/libstrongswan/library.c @@ -80,6 +80,7 @@ void library_deinit() /* make sure the cache is clear before unloading plugins */ lib->credmgr->flush_cache(lib->credmgr, CERT_ANY); + this->public.streams->destroy(this->public.streams); this->public.watcher->destroy(this->public.watcher); this->public.scheduler->destroy(this->public.scheduler); this->public.processor->destroy(this->public.processor); @@ -268,6 +269,7 @@ bool library_init(char *settings) this->public.processor = processor_create(); this->public.scheduler = scheduler_create(); this->public.watcher = watcher_create(); + this->public.streams = stream_manager_create(); this->public.plugins = plugin_loader_create(); if (!check_memwipe()) diff --git a/src/libstrongswan/library.h b/src/libstrongswan/library.h index d5497258aa..560da27f98 100644 --- a/src/libstrongswan/library.h +++ b/src/libstrongswan/library.h @@ -58,6 +58,9 @@ * @defgroup networking networking * @ingroup libstrongswan * + * @defgroup streams streams + * @ingroup networking + * * @defgroup plugins plugins * @ingroup libstrongswan * @@ -90,6 +93,7 @@ #include "utils/printf_hook.h" #include "utils/utils.h" #include "networking/host_resolver.h" +#include "networking/streams/stream_manager.h" #include "processing/processor.h" #include "processing/scheduler.h" #include "processing/watcher.h" @@ -202,6 +206,11 @@ struct library_t { */ watcher_t *watcher; + /** + * Streams and Services + */ + stream_manager_t *streams; + /** * resolve hosts by DNS name */ diff --git a/src/libstrongswan/networking/streams/stream.c b/src/libstrongswan/networking/streams/stream.c index c6a73df17f..43a6bd47e2 100644 --- a/src/libstrongswan/networking/streams/stream.c +++ b/src/libstrongswan/networking/streams/stream.c @@ -13,8 +13,7 @@ * for more details. */ -#include "stream.h" - +#include #include #include diff --git a/src/libstrongswan/networking/streams/stream_manager.h b/src/libstrongswan/networking/streams/stream_manager.h index 347596f5cb..ab014175c2 100644 --- a/src/libstrongswan/networking/streams/stream_manager.h +++ b/src/libstrongswan/networking/streams/stream_manager.h @@ -23,7 +23,6 @@ typedef struct stream_manager_t stream_manager_t; -#include #include /** diff --git a/src/libstrongswan/networking/streams/stream_service.c b/src/libstrongswan/networking/streams/stream_service.c index 4979ed60f2..489edaef42 100644 --- a/src/libstrongswan/networking/streams/stream_service.c +++ b/src/libstrongswan/networking/streams/stream_service.c @@ -13,8 +13,7 @@ * for more details. */ -#include "stream_service.h" - +#include #include #include