Commit 73665a19 authored by mr-ti's avatar mr-ti
Browse files

No commit message

No commit message
parent b9c86bd6
......@@ -2,7 +2,7 @@
PROJECT(ddnssync)
# ### COMMUN ###
SET(ddnssync_SRCS main.cpp ddnssslist.cpp)
SET(ddnssync_SRCS main.cpp ddnssslist.cpp ddnsspluginlist.cpp)
SET(ddnssync_LIBS ddnssbase unicomdb)
SET(ddnssync_DEFS ${global_unicomctrl_DEFS})
SET(ddnssync_LDFS )
......
......@@ -9,17 +9,16 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "cunipluginlist.h"
#include "cunipluginpus.h"
#include "cunipluginlib.h"
#include "ddnsspluginlist.h"
#include <dlfcn.h>
/**
* @brief DDnsSPluginList constructor.
*/
DDnsSPluginListList::DDnsSPluginListList(CUniConf *config):CUniObj() {
string dirPath=config->getValue("plugin_dir_path");
DDnsSPluginListList::DDnsSPluginListList(CUniConf &config):CUniObj() {
string dirPath=config.getValue("plugin_dir_path");
if(!dirPath.empty()){
CUniStringList list=config->getListValue("plugin_list");
CUniStringList list=config.getListValue("plugin_list");
Plugin *plugin;
string plugPath;
......@@ -53,7 +52,7 @@ DDnsSPluginListList::DDnsSPluginListList(CUniConf *config):CUniObj() {
* @brief DDnsSPluginList destructor.
*/
DDnsSPluginListList::~DDnsSPluginListList() {
for(iterator it=begin();it!=end();it++){
for(map<string,Plugin *>::iterator it=plugList.begin();it!=plugList.end();it++){
dlclose(it->second->handle);
delete it->second;
printd("~() >> plugin \""+it->first+"\" unloaded.\n");
......
......@@ -20,7 +20,8 @@
#ifndef DDNSSPLUGINLIST_H
#define DDNSSPLUGINLIST_H
#include <unicomctrl/cuniobj.h>
#include <unicomctrl/cuniconf.h>
#include <unicomctrl/unilib.h>
#include <map>
/**
......
......@@ -52,7 +52,7 @@ DDnsSSList::DName::~DName()
int DDnsSSList::DName::run(){
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment