* remove some warnings
authorChristian Linke <christian.linke@bmw.de>
Thu, 20 Jun 2013 14:18:54 +0000 (16:18 +0200)
committerChristian Linke <christian.linke@bmw.de>
Wed, 26 Jun 2013 15:46:46 +0000 (17:46 +0200)
Signed-off-by: Christian Linke <christian.linke@bmw.de>
AudioManagerDaemon/src/CAmDbusWrapper.cpp
AudioManagerDaemon/src/CAmSocketHandler.cpp
AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp
PluginCommandInterfaceDbus/include/configCommandDbus.h
include/shared/CAmSocketHandler.h

index be9b369..18cf70b 100644 (file)
@@ -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(), //
index 19d61c0..4edfbba 100644 (file)
@@ -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;
index 15b4a0e..70c9f9b 100644 (file)
@@ -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++;
index 369beea..0c1989d 100644 (file)
@@ -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 */
index 272958a..1e91b5f 100644 (file)
@@ -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