]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
stream: create library instance of stream-manager
authorMartin Willi <martin@revosec.ch>
Thu, 27 Jun 2013 08:16:00 +0000 (10:16 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 17 Jul 2013 14:55:46 +0000 (16:55 +0200)
src/libstrongswan/library.c
src/libstrongswan/library.h
src/libstrongswan/networking/streams/stream.c
src/libstrongswan/networking/streams/stream_manager.h
src/libstrongswan/networking/streams/stream_service.c

index 35d74200c32d27024b0e7cd97f399160719bfc2e..f2fa3e0aa2096a545939f5effc1e94c06b997325 100644 (file)
@@ -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())
index d5497258aa0af048b4b78b9356f8d39c9f6c5903..560da27f98275b0d8dd4a8699a50c5f5cdd9ab47 100644 (file)
@@ -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
         */
index c6a73df17f361598acf0948bda8ad6ea1e729cbc..43a6bd47e214e654edcd02a28844b45b2bb1114e 100644 (file)
@@ -13,8 +13,7 @@
  * for more details.
  */
 
-#include "stream.h"
-
+#include <library.h>
 #include <errno.h>
 #include <unistd.h>
 
index 347596f5cbf57e2f5ec3deba1fb8ce229a5a02cc..ab014175c266bf7a4e178f81b6d5b28c1233e36f 100644 (file)
@@ -23,7 +23,6 @@
 
 typedef struct stream_manager_t stream_manager_t;
 
-#include <networking/streams/stream.h>
 #include <networking/streams/stream_service.h>
 
 /**
index 4979ed60f2506a9477a28d89229707b9ccc6f6c2..489edaef4215521f25a2ab547cc8e845044f169b 100644 (file)
@@ -13,8 +13,7 @@
  * for more details.
  */
 
-#include "stream_service.h"
-
+#include <library.h>
 #include <threading/thread.h>
 #include <processing/jobs/callback_job.h>