Fix some bugs
diff --git a/src/ccnx/sync-socket.cc b/src/ccnx/sync-socket.cc
index 48d4ad0..3ef1c96 100644
--- a/src/ccnx/sync-socket.cc
+++ b/src/ccnx/sync-socket.cc
@@ -31,13 +31,18 @@
RemoveCallback rmCallback )
: m_newDataCallback(dataCallback)
, m_syncPolicyManager(syncPolicyManager)
+ , m_handler(Ptr<Wrapper>(new Wrapper(Ptr<security::Keychain>(new security::Keychain(Ptr<security::IdentityManager>::Create(),
+ m_syncPolicyManager,
+ NULL)))))
, m_syncLogic (syncPrefix,
syncPolicyManager,
+ m_handler,
bind(&SyncSocket::passCallback, this, _1),
rmCallback)
{
- Ptr<security::Keychain> keychain = Ptr<security::Keychain>(new security::Keychain(Ptr<security::IdentityManager>::Create(), m_syncPolicyManager, NULL));
- m_handler = Ptr<Wrapper>(new Wrapper(keychain));
+ // Ptr<security::Keychain> keychain = Ptr<security::Keychain>(new security::Keychain(Ptr<security::IdentityManager>::Create(), m_syncPolicyManager, NULL));
+ // m_handler = Ptr<Wrapper>(new Wrapper(keychain));
+ m_syncPolicyManager->setWrapper(m_handler);
}
SyncSocket::~SyncSocket()