From 23f2ff4688da0c424cd62b7f6a35f6639be58d69 Mon Sep 17 00:00:00 2001
From: Georg Lukas <georg@op-co.de>
Date: Mon, 16 Mar 2009 14:08:08 +0100
Subject: remoteconfig + testmodule merge

---
 src/Makefile.am     |    4 ++--
 src/remoteConfig.cc |    4 +++-
 src/testmodul.cc    |   16 ++++++++++++++++
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 9c93ec1e75d6c8a755318ed32017fe87cfac60a8..26609f7eecdfea0a748a04184a11ba78f720d90b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -113,10 +113,10 @@ spp_la_CPPFLAGS = -DMODULE_NAME=spp $(COMMON_CPPFLAGS)
 spp_la_LDFLAGS  = $(module_flags)
 spp_la_LIBADD = -lgea3 -lgea3-posix 
 
-testModul_la_SOURCES  = testmodul.cc testmodul.h configVariable.h remoteConfig.h
+testModul_la_SOURCES  = testmodul.cc testmodul.h remoteConfig.cc
 testModul_la_CPPFLAGS = -DMODULE_NAME=testModul $(COMMON_CPPFLAGS)
 testModul_la_LDFLAGS  = $(module_flags)
-testModul_la_LIBADD = -lgea3 -lgea3-posix .libs/remoteConfig.so
+testModul_la_LIBADD = -lgea3 -lgea3-posix
 
 shell_la_SOURCES  = shell.cc unixfdostream.h
 shell_la_CPPFLAGS = -DMODULE_NAME=shell $(COMMON_CPPFLAGS)
diff --git a/src/remoteConfig.cc b/src/remoteConfig.cc
index 66cddeaff3e7fe7f82ae59ff1ffd97501a41ce69..1c478b04cbaa76e1b99b788d10fedeb32aeb74c3 100644
--- a/src/remoteConfig.cc
+++ b/src/remoteConfig.cc
@@ -227,6 +227,7 @@ int RemoteConfig::requestHandler (void *data, ReadMarshalStream*  msIn, WriteMar
     return 0;
 }
 
+/*
 GEA_MAIN(argc, argv)
 {
 
@@ -245,4 +246,5 @@ GEA_MAIN(argc, argv)
 	}
 
     return 0;
-}
\ No newline at end of file
+}
+*/
diff --git a/src/testmodul.cc b/src/testmodul.cc
index 54980a293c9d2d5656df4045f07796a6d4d73174..5ea65f2bfb823da809e9af6303d6033e168b259e 100644
--- a/src/testmodul.cc
+++ b/src/testmodul.cc
@@ -93,6 +93,22 @@ int RemoteConfigTestModule::remoteconfigTestModule_command_fn(ShellClient &sc, v
 GEA_MAIN(argc, argv)
 {
 
+
+	RemoteConfig *remoteConfig = new RemoteConfig();
+	REP_INSERT_OBJ(RemoteConfig *, remoteConfig, remoteConfig);
+	REP_MAP_OBJ(SppManager *,sppManager);
+	if (!sppManager)
+	{
+		GEA.dbg() << "SppManager not found :( " << endl;
+	}
+	else
+	if (argc == 1)
+	{
+		sppManager->registerHandler(9876, 0, RemoteConfig::requestHandler);
+		GEA.dbg() << "Handler registered with SPP" << endl;
+	}
+	remoteConfig->remoteConfigAddCommand();
+
 	RemoteConfigTestModule *remoteConfigTest = new RemoteConfigTestModule();
 	REP_INSERT_OBJ(RemoteConfigTestModule *, remoteConfigTest, remoteConfigTest);
 	if (!remoteConfigTest)//TODO hier eher nen fehler abfangen als NULL checken weil evtl wirds net NULL gesetzt
-- 
1.6.2.1


