From e4107bd0ed54194a5cfef60c322fee63bbeeabb2 Mon Sep 17 00:00:00 2001 From: Christian Linke Date: Thu, 20 Jun 2013 16:18:54 +0200 Subject: * remove some warnings Signed-off-by: Christian Linke --- AudioManagerDaemon/src/CAmDbusWrapper.cpp | 2 +- AudioManagerDaemon/src/CAmSocketHandler.cpp | 17 ++++++++--------- AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp | 2 -- PluginCommandInterfaceDbus/include/configCommandDbus.h | 4 ++-- include/shared/CAmSocketHandler.h | 4 +--- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/AudioManagerDaemon/src/CAmDbusWrapper.cpp b/AudioManagerDaemon/src/CAmDbusWrapper.cpp index be9b369..18cf70b 100644 --- a/AudioManagerDaemon/src/CAmDbusWrapper.cpp +++ b/AudioManagerDaemon/src/CAmDbusWrapper.cpp @@ -51,8 +51,8 @@ CAmDbusWrapper::CAmDbusWrapper(CAmSocketHandler* socketHandler, DBusBusType type pDbusDispatchCallback(this, &CAmDbusWrapper::dbusDispatchCallback), // pDbusFireCallback(this, &CAmDbusWrapper::dbusFireCallback), // pDbusCheckCallback(this, &CAmDbusWrapper::dbusCheckCallback), // - pDbusTimerCallback(this, &CAmDbusWrapper::dbusTimerCallback), // pDbusPrepareCallback(this,&CAmDbusWrapper::dbusPrepareCallback), // + pDbusTimerCallback(this, &CAmDbusWrapper::dbusTimerCallback), // mpDbusConnection(0), // mDBusError(), // mListNodes(), // diff --git a/AudioManagerDaemon/src/CAmSocketHandler.cpp b/AudioManagerDaemon/src/CAmSocketHandler.cpp index 19d61c0..4edfbba 100644 --- a/AudioManagerDaemon/src/CAmSocketHandler.cpp +++ b/AudioManagerDaemon/src/CAmSocketHandler.cpp @@ -37,7 +37,8 @@ namespace am CAmSocketHandler::CAmSocketHandler() : receiverCallbackT(this, &CAmSocketHandler::receiverCallback),// checkerCallbackT(this, &CAmSocketHandler::checkerCallback),// - mPipe(), + mPipe(), // + mDispatchDone(1),// mListPoll(), // mListTimer(), // mListActiveTimer(), // @@ -46,8 +47,6 @@ CAmSocketHandler::CAmSocketHandler() : mRecreatePollfds(true), // mStartTime() // { - gDispatchDone = 1; - if (pipe(mPipe) == -1) { logError("CAmSerializer could not create pipe!"); @@ -70,7 +69,7 @@ CAmSocketHandler::~CAmSocketHandler() */ void CAmSocketHandler::start_listenting() { - gDispatchDone = 0; + mDispatchDone = 0; int16_t pollStatus; //prepare the signalmask @@ -83,7 +82,7 @@ void CAmSocketHandler::start_listenting() sigaddset(&sigmask, SIGQUIT); clock_gettime(CLOCK_MONOTONIC, &mStartTime); - while (!gDispatchDone) + while (!mDispatchDone) { //first we go through the registered filedescriptors and check if someone needs preparation: std::for_each(mListPoll.begin(), mListPoll.end(), CAmShCallPrep()); @@ -164,7 +163,7 @@ void CAmSocketHandler::start_listenting() */ void CAmSocketHandler::stop_listening() { - gDispatchDone = 1; + mDispatchDone = 1; //this is for all running timers only - we need to handle the additional offset here if (!mListActiveTimer.empty()) @@ -265,7 +264,7 @@ am_Error_e CAmSocketHandler::addTimer(const timespec timeouts, IAmShTimerCallBac //we add here the time difference between startTime and currenttime, because this time will be substracted later on in timecorrection timespec currentTime; clock_gettime(CLOCK_MONOTONIC, ¤tTime); - if (!gDispatchDone) //the mainloop is started + if (!mDispatchDone) //the mainloop is started timerItem.countdown = timespecAdd(timeouts, timespecSub(currentTime, mStartTime)); mListActiveTimer.push_back(timerItem); @@ -329,7 +328,7 @@ am_Error_e CAmSocketHandler::updateTimer(const sh_timerHandle_t handle, const ti currentTime.tv_nsec=timeoutsCorrected.tv_nsec=0; currentTime.tv_sec=timeoutsCorrected.tv_sec=0; clock_gettime(CLOCK_MONOTONIC, ¤tTime); - if (!gDispatchDone) //the mainloop is started + if (!mDispatchDone) //the mainloop is started timeoutsCorrected = timespecAdd(timeouts, timespecSub(currentTime, mStartTime)); for (; activeIt != mListActiveTimer.end(); ++activeIt) @@ -378,7 +377,7 @@ am_Error_e CAmSocketHandler::restartTimer(const sh_timerHandle_t handle) //we add here the time difference between startTime and currenttime, because this time will be substracted later on in timecorrection timespec currentTime, timeoutsCorrected; clock_gettime(CLOCK_MONOTONIC, ¤tTime); - if (!gDispatchDone) //the mainloop is started + if (!mDispatchDone) //the mainloop is started { timeoutsCorrected = timespecAdd(timerItem.countdown, timespecSub(currentTime, mStartTime)); timerItem.countdown = timeoutsCorrected; diff --git a/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp b/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp index 15b4a0e..70c9f9b 100644 --- a/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp +++ b/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp @@ -974,8 +974,6 @@ void CAmTelnetMenuHelper::setRoutingCommandExec(std::queue& CmdQueu std::vector::iterator reIter = rlIter->route.begin(); for (; reIter < rlIter->route.end(); reIter++) { - reIter->connectionFormat; - reIter->domainID; output << ">(" << reIter->sourceID << ")->--[D:" << reIter->domainID << "][F:" << reIter->connectionFormat << "]-->-(" << reIter->sinkID << ")" << std::endl; } rlCnt++; diff --git a/PluginCommandInterfaceDbus/include/configCommandDbus.h b/PluginCommandInterfaceDbus/include/configCommandDbus.h index 369beea..0c1989d 100644 --- a/PluginCommandInterfaceDbus/include/configCommandDbus.h +++ b/PluginCommandInterfaceDbus/include/configCommandDbus.h @@ -1,7 +1,7 @@ #ifndef _COMMANDDBUS_CONFIG_H #define _COMMANDDBUS_CONFIG_H -#define COMMAND_DBUS_INTROSPECTION_FILE "/home/christian/workspace/AudioManager/bin/CommandInterface.xml" -#define LIBRARY_OUTPUT_PATH "/home/christian/workspace/AudioManager/bin/plugins/command" +#define COMMAND_DBUS_INTROSPECTION_FILE "/home/genius/workspace/workspace/AudioManager/bin/CommandInterface.xml" +#define LIBRARY_OUTPUT_PATH "/home/genius/workspace/workspace/AudioManager/bin/plugins/command" #endif /* _COMMANDDBUS_CONFIG_H */ diff --git a/include/shared/CAmSocketHandler.h b/include/shared/CAmSocketHandler.h index 272958a..1e91b5f 100644 --- a/include/shared/CAmSocketHandler.h +++ b/include/shared/CAmSocketHandler.h @@ -33,8 +33,6 @@ namespace am #define MAX_NS 1000000000L -static volatile sig_atomic_t gDispatchDone = 1; //this global is used to stop the mainloop - typedef uint16_t sh_timerHandle_t; //!