Skip to content

Commit

Permalink
Merge pull request #86 from fledge-iot/2.4.0RC
Browse files Browse the repository at this point in the history
2.4.0RC
  • Loading branch information
dianomicbot authored Apr 17, 2024
2 parents 8f95a74 + 35dab33 commit c230219
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
24 changes: 12 additions & 12 deletions C/services/notification/notification_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ NotificationDelivery::~NotificationDelivery()

// Create data object for delivery queue
// with no reason, no message and notifcation instance set to NULL
// This elemet added to delivery queue will signal the need of stutting down
// This element added to delivery queue will signal the need of shutting down
// the DeliveryPlugin after processing all data for this Delivery
DeliveryDataElement* deliveryData =
new DeliveryDataElement(
Expand Down Expand Up @@ -335,7 +335,7 @@ NotificationManager::NotificationManager(const std::string& serviceName,
NotificationManager::~NotificationManager()
{
lock_guard<mutex> guard(m_instancesMutex);
// Mark is instance as zombie
// Mark this instance as zombie
for (auto it = m_instances.begin();
it != m_instances.end();
++it)
Expand Down Expand Up @@ -562,7 +562,7 @@ PLUGIN_HANDLE NotificationManager::loadRulePlugin(const string& rulePluginName)
if ((handle = manager->loadPlugin(rulePluginName,
PLUGIN_TYPE_NOTIFICATION_RULE)) != NULL)
{
// Suceess
// Success
m_logger->info("Loaded rule plugin '%s'.",
rulePluginName.c_str());
}
Expand Down Expand Up @@ -595,7 +595,7 @@ PLUGIN_HANDLE NotificationManager::loadDeliveryPlugin(const string& loadDelivery
if ((handle = manager->loadPlugin(loadDeliveryPlugin,
PLUGIN_TYPE_NOTIFICATION_DELIVERY)) != NULL)
{
// Suceess
// Success
m_logger->info("Loaded delivery plugin '%s'.",
loadDeliveryPlugin.c_str());
}
Expand Down Expand Up @@ -1370,7 +1370,7 @@ bool NotificationManager::setupRuleDeliveryFirst(const string& name, const Confi

DeliveryPlugin* deliver = this->createDeliveryCategory(notificationName, deliveryPluginName, false);

if (rule && deliver)
if (rule && deliver && enabled)
{
// Create category names for plugins under instanceName
// Register category interest as well
Expand Down Expand Up @@ -1471,11 +1471,11 @@ bool NotificationManager::setupRuleDeliveryFirst(const string& name, const Confi


/**
* Add an delivery to a notification instance
* Add a delivery to a notification instance
*
* @param config The configuration for the new instance.
* @param deliveryCategoryName The delivery name
* @param config The configuration ofr the delivery.
* @param config The configuration of the delivery.
* @return True on success, false otherwise.
*/
bool NotificationManager::addDelivery(const ConfigCategory& config, const string &deliveryCategoryName, ConfigCategory &deliveryConfig)
Expand Down Expand Up @@ -1514,7 +1514,7 @@ bool NotificationManager::addDelivery(const ConfigCategory& config, const string
NotificationDelivery* theDelivery = NULL;

// Call delivery "plugin_init" with configuration
// and instantiate NotificationDelivery class
// and instantiate NotificationDelivery class
if (deliver->init(deliveryConfig))
{
// Check and set registerIngest
Expand Down Expand Up @@ -1667,7 +1667,7 @@ bool NotificationInstance::updateInstance(const string& name,
// Create a new subscription
subscriptions->createSubscription((*i).second);

Logger::getLogger()->info("Succesfully enabled notification instance '%s'",
Logger::getLogger()->info("Successfully enabled notification instance '%s'",
name.c_str());
enabled = true;
}
Expand Down Expand Up @@ -1716,7 +1716,7 @@ bool NotificationInstance::updateInstance(const string& name,
bool ret = instances->setupInstance(name, newConfig);
if (ret)
{
Logger::getLogger()->info("Succesfully disabled notification instance '%s'",
Logger::getLogger()->info("Successfully disabled notification instance '%s'",
name.c_str());
}
else
Expand Down Expand Up @@ -1777,7 +1777,7 @@ bool NotificationInstance::updateInstance(const string& name,
subscriptions->removeSubscription(a->getSource(),
a->getAssetName(),
ruleName);
// Remove asseet
// Remove asset
a = assets.erase(a);
}
}
Expand Down Expand Up @@ -2043,7 +2043,7 @@ bool NotificationManager::APIdeleteInstance(const string& instanceName)
subscriptions->removeSubscription(a->getSource(),
a->getAssetName(),
ruleName);
// Remove asseet
// Remove asset
a = assets.erase(a);
}
}
Expand Down
1 change: 1 addition & 0 deletions C/services/notification/notification_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ bool NotificationService::start(string& coreAddress,
storageInfo.getPort());
m_storage = &storageClient;

m_storage->registerManagement(m_mgtClient);

// Setup NotificationManager class
NotificationManager instances(m_name, m_mgtClient, this);
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fledge_version>=2.3
notification_version=2.3.0
fledge_version>=2.4
notification_version=2.4.0

0 comments on commit c230219

Please sign in to comment.