From 5f02509296864bc5b4b438139a246fb3119802ed Mon Sep 17 00:00:00 2001 From: christian mueller Date: Thu, 12 Jan 2012 16:08:54 +0100 Subject: * fixed commandline option p is now recognized * fixed bug: loading of routing plugins with version control now works --- AudioManagerDaemon/src/RoutingSender.cpp | 18 +++++++++--------- AudioManagerDaemon/src/main.cpp | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'AudioManagerDaemon/src') diff --git a/AudioManagerDaemon/src/RoutingSender.cpp b/AudioManagerDaemon/src/RoutingSender.cpp index 2b2adb5..46263ec 100644 --- a/AudioManagerDaemon/src/RoutingSender.cpp +++ b/AudioManagerDaemon/src/RoutingSender.cpp @@ -67,7 +67,8 @@ RoutingSender::RoutingSender(const std::vector& listOfPluginDirecto if (!directory) { - //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Error opening directory "),DLT_STRING(dirName.c_str())); + DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("RoutingSender::RoutingSender Error opening directory "),DLT_STRING(directoryName)); + continue; } // iterate content of directory @@ -77,18 +78,18 @@ RoutingSender::RoutingSender(const std::vector& listOfPluginDirecto unsigned char entryType = itemInDirectory->d_type; std::string entryName = itemInDirectory->d_name; - bool regularFile = (entryType == DT_REG); + bool regularFile = (entryType == DT_REG || entryType == DT_LNK); bool sharedLibExtension = ("so" == entryName.substr(entryName.find_last_of(".") + 1)); if (regularFile && sharedLibExtension) { - // DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("PluginSearch adding file "),DLT_STRING(entryName.c_str())); + DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingSender::RoutingSender adding file "),DLT_STRING(entryName.c_str())); std::string name(directoryName); sharedLibraryNameList.push_back(name + "/" + entryName); } else { - //DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("PluginSearch ignoring file "),DLT_STRING(entryName.c_str())); + DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingSender::RoutingSender PluginSearch ignoring file "),DLT_STRING(entryName.c_str())); } } @@ -101,7 +102,7 @@ RoutingSender::RoutingSender(const std::vector& listOfPluginDirecto for (; iter != iterEnd; ++iter) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingPlugin: "),DLT_STRING(iter->c_str())); + DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingSender::RoutingSender try loading "),DLT_STRING(iter->c_str())); RoutingSendInterface* (*createFunc)(); void* tempLibHandle=NULL; @@ -109,7 +110,7 @@ RoutingSender::RoutingSender(const std::vector& listOfPluginDirecto if (!createFunc) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("Entry point of RoutingPlugin not found")); + DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("RoutingSender::RoutingSender Entry point of RoutingPlugin not found")); continue; } @@ -117,7 +118,7 @@ RoutingSender::RoutingSender(const std::vector& listOfPluginDirecto if (!router) { - DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingPlugin initialization failed. Entry Function not callable")); + DLT_LOG(AudioManager,DLT_LOG_ERROR, DLT_STRING("RoutingSender::RoutingSender RoutingPlugin initialization failed. Entry Function not callable")); continue; } @@ -127,7 +128,7 @@ RoutingSender::RoutingSender(const std::vector& listOfPluginDirecto //check libversion if (router->getInterfaceVersion()& listOfPluginDirecto mListInterfaces.push_back(routerInterface); mListLibraryHandles.push_back(tempLibHandle); } - //now all plugins are loaded, so the interface is ready } RoutingSender::~RoutingSender() diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp index d5c447d..d2ed51d 100644 --- a/AudioManagerDaemon/src/main.cpp +++ b/AudioManagerDaemon/src/main.cpp @@ -141,7 +141,7 @@ void parseCommandLine(int argc, char **argv) { while (optind < argc) { - int option = getopt (argc, argv, "h::v::c::l::r::L::R::d::t::m::i::"); + int option = getopt (argc, argv, "h::v::c::l::r::L::R::d::t::m::i::p::"); switch (option) { -- cgit v1.2.1