diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-02-27 22:43:14 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-02-27 22:43:14 +0000 |
commit | 4083c982656fe3d79168b228aca56cef2de2ea0e (patch) | |
tree | 6574a170eb044ea75dd4f96cd22cb6b4c171d465 /syncCommand.h | |
parent | added command line parameter for master key and salt (diff) |
added route syncing
Diffstat (limited to 'syncCommand.h')
-rw-r--r-- | syncCommand.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/syncCommand.h b/syncCommand.h index b2f3fc5..29b063c 100644 --- a/syncCommand.h +++ b/syncCommand.h @@ -5,26 +5,40 @@ #include "connectionList.h" #include "threadUtils.hpp" +#include "syncConnectionCommand.h" +#include "syncRouteCommand.h" +#include <string> class SyncCommand { public: SyncCommand(ConnectionList & cl ); SyncCommand(ConnectionList & cl ,u_int16_t mux); - u_int16_t getMux() const; + SyncCommand(u_int16_t mux); + ~SyncCommand(); private: SyncCommand(const SyncCommand &); - ConnectionList & cl_; - u_int16_t mux_; + SyncConnectionCommand * scc_; + SyncRouteCommand * src_; friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int version) { - Lock lock(cl_.getMutex()); - ar & mux_; - ConnectionParam & conn = cl_.getOrNewConnectionUnlocked(mux_); - ar & conn; + std::string syncstr; + if (scc_) + { + syncstr = "connection"; + } + if ( src_) + { + syncstr = "route"; + } + ar & syncstr; + if (syncstr == "connection") + ar & *scc_; + if (syncstr == "route") + ar & *src_; } }; |