summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2011-12-29 17:07:38 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2011-12-30 03:08:00 +0100
commit93d7610b460c6212a3098a3eccb127fd45ada345 (patch)
tree0e00544ede90f06dd9933c003c4b7cc72f964af3 /includes
parentb7e748007bbe0b16fa8a8a089c6cc8fe43bc7aac (diff)
downloadaudiomanager-93d7610b460c6212a3098a3eccb127fd45ada345.tar.gz
*added versioning support automatically out of git
*added commandline parser *changed DLT_CONTEXT for AudioManager to AudioManager *added signalhandler *TODO: make signalhandler not only call but correctly rundown the daemon
Diffstat (limited to 'includes')
-rw-r--r--includes/SocketHandler.h5
-rw-r--r--includes/config.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/includes/SocketHandler.h b/includes/SocketHandler.h
index 74f20ac..5d72f3e 100644
--- a/includes/SocketHandler.h
+++ b/includes/SocketHandler.h
@@ -32,9 +32,12 @@
#include <sys/poll.h>
#include <list>
#include <map>
+#include <signal.h>
namespace am {
+static volatile sig_atomic_t gDispatchDone = 0; //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
@@ -124,7 +127,7 @@ private:
sh_timerHandle_t mLastInsertedHandle;
sh_pollHandle_t mLastInsertedPollHandle;
timespec mTimeout;
- bool mDispatch;
+ timespec *mTimeoutPointer; //we need this because for infinite loops we need to set this to NULL mTimeout -1 is not working with ppoll
bool mRecreatePollfds;
};
diff --git a/includes/config.h b/includes/config.h
index ea737e0..7999e0d 100644
--- a/includes/config.h
+++ b/includes/config.h
@@ -1,9 +1,12 @@
#ifndef _CONFIG_H
#define _CONFIG_H
+#define DAEMONVERSION "ver-0.0.1-1-g8e09101"
+
#define WITH_DBUS_WRAPPER
#define WITH_SOCKETHANDLER_LOOP
/* #undef WITH_SIMPLEDBUS_LOOP */
+#define WITH_PPOLL
#define DEFAULT_PLUGIN_COMMAND_DIR "/home/christian/workspace/gitserver/bin/plugins/command"
#define DEFAULT_PLUGIN_ROUTING_DIR "/home/christian/workspace/gitserver/bin/plugins/routing"