Fixing the Add/Delete Contact bug, now when a contact is added and removed, the panelPolicyManager will add/remove the contact into/from trust anchors
Change-Id: Ia7a8bc5c6cbe1744018410c0ca0019db3e5d3994
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 13e4adb..2d722d7 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -629,6 +629,7 @@
try{
m_contactStorage->addContact(contactItem);
+ emit contactAdded(contactItem.getNameSpace());
}catch(exception& e){
emit warning(e.what());
_LOG_ERROR("Exception: " << e.what());
@@ -636,6 +637,15 @@
}
}
+void
+ContactManager::removeContact(const ndn::Name& contactNameSpace)
+{
+ Ptr<ContactItem> contact = getContact(contactNameSpace);
+ if(contact == NULL)
+ return;
+ m_contactStorage->removeContact(contactNameSpace);
+ emit contactRemoved(contact->getPublicKeyName());
+}
#if WAF