summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Linke <christian.linke@bmw.de>2013-06-20 16:18:54 +0200
committerChristian Linke <christian.linke@bmw.de>2013-06-26 17:46:46 +0200
commite4107bd0ed54194a5cfef60c322fee63bbeeabb2 (patch)
tree260a26dff3ff731a6a1e1c7dabae5af5e2535542
parente644ee75418c08aba72f388e376b83251c3a0b51 (diff)
downloadaudiomanager-e4107bd0ed54194a5cfef60c322fee63bbeeabb2.tar.gz
* remove some warnings
Signed-off-by: Christian Linke <christian.linke@bmw.de>
-rw-r--r--AudioManagerDaemon/src/CAmDbusWrapper.cpp2
-rw-r--r--AudioManagerDaemon/src/CAmSocketHandler.cpp17
-rw-r--r--AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp2
-rw-r--r--PluginCommandInterfaceDbus/include/configCommandDbus.h4
-rw-r--r--include/shared/CAmSocketHandler.h4
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, &currentTime);
- 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, &currentTime);
- 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, &currentTime);
- 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<std::string>& CmdQueu
std::vector<am_RoutingElement_s>::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; //!<this is a handle for a timer to be used with the SocketHandler
typedef uint16_t sh_pollHandle_t; //!<this is a handle for a filedescriptor to be used with the SocketHandler
@@ -179,7 +177,7 @@ private:
static CAmSocketHandler* mInstance;
int mPipe[2];
-
+ int mDispatchDone; //this starts / stops the mainloop
struct sh_timer_s //!<struct that holds information of timers
{
sh_timerHandle_t handle; //!<the handle of the timer