Skip to content

Commit c230219

Browse files
authored
Merge pull request #86 from fledge-iot/2.4.0RC
2.4.0RC
2 parents 8f95a74 + 35dab33 commit c230219

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

C/services/notification/notification_manager.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ NotificationDelivery::~NotificationDelivery()
152152

153153
// Create data object for delivery queue
154154
// with no reason, no message and notifcation instance set to NULL
155-
// This elemet added to delivery queue will signal the need of stutting down
155+
// This element added to delivery queue will signal the need of shutting down
156156
// the DeliveryPlugin after processing all data for this Delivery
157157
DeliveryDataElement* deliveryData =
158158
new DeliveryDataElement(
@@ -335,7 +335,7 @@ NotificationManager::NotificationManager(const std::string& serviceName,
335335
NotificationManager::~NotificationManager()
336336
{
337337
lock_guard<mutex> guard(m_instancesMutex);
338-
// Mark is instance as zombie
338+
// Mark this instance as zombie
339339
for (auto it = m_instances.begin();
340340
it != m_instances.end();
341341
++it)
@@ -562,7 +562,7 @@ PLUGIN_HANDLE NotificationManager::loadRulePlugin(const string& rulePluginName)
562562
if ((handle = manager->loadPlugin(rulePluginName,
563563
PLUGIN_TYPE_NOTIFICATION_RULE)) != NULL)
564564
{
565-
// Suceess
565+
// Success
566566
m_logger->info("Loaded rule plugin '%s'.",
567567
rulePluginName.c_str());
568568
}
@@ -595,7 +595,7 @@ PLUGIN_HANDLE NotificationManager::loadDeliveryPlugin(const string& loadDelivery
595595
if ((handle = manager->loadPlugin(loadDeliveryPlugin,
596596
PLUGIN_TYPE_NOTIFICATION_DELIVERY)) != NULL)
597597
{
598-
// Suceess
598+
// Success
599599
m_logger->info("Loaded delivery plugin '%s'.",
600600
loadDeliveryPlugin.c_str());
601601
}
@@ -1370,7 +1370,7 @@ bool NotificationManager::setupRuleDeliveryFirst(const string& name, const Confi
13701370

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

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

14721472

14731473
/**
1474-
* Add an delivery to a notification instance
1474+
* Add a delivery to a notification instance
14751475
*
14761476
* @param config The configuration for the new instance.
14771477
* @param deliveryCategoryName The delivery name
1478-
* @param config The configuration ofr the delivery.
1478+
* @param config The configuration of the delivery.
14791479
* @return True on success, false otherwise.
14801480
*/
14811481
bool NotificationManager::addDelivery(const ConfigCategory& config, const string &deliveryCategoryName, ConfigCategory &deliveryConfig)
@@ -1514,7 +1514,7 @@ bool NotificationManager::addDelivery(const ConfigCategory& config, const string
15141514
NotificationDelivery* theDelivery = NULL;
15151515

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

1670-
Logger::getLogger()->info("Succesfully enabled notification instance '%s'",
1670+
Logger::getLogger()->info("Successfully enabled notification instance '%s'",
16711671
name.c_str());
16721672
enabled = true;
16731673
}
@@ -1716,7 +1716,7 @@ bool NotificationInstance::updateInstance(const string& name,
17161716
bool ret = instances->setupInstance(name, newConfig);
17171717
if (ret)
17181718
{
1719-
Logger::getLogger()->info("Succesfully disabled notification instance '%s'",
1719+
Logger::getLogger()->info("Successfully disabled notification instance '%s'",
17201720
name.c_str());
17211721
}
17221722
else
@@ -1777,7 +1777,7 @@ bool NotificationInstance::updateInstance(const string& name,
17771777
subscriptions->removeSubscription(a->getSource(),
17781778
a->getAssetName(),
17791779
ruleName);
1780-
// Remove asseet
1780+
// Remove asset
17811781
a = assets.erase(a);
17821782
}
17831783
}
@@ -2043,7 +2043,7 @@ bool NotificationManager::APIdeleteInstance(const string& instanceName)
20432043
subscriptions->removeSubscription(a->getSource(),
20442044
a->getAssetName(),
20452045
ruleName);
2046-
// Remove asseet
2046+
// Remove asset
20472047
a = assets.erase(a);
20482048
}
20492049
}

C/services/notification/notification_service.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ bool NotificationService::start(string& coreAddress,
260260
storageInfo.getPort());
261261
m_storage = &storageClient;
262262

263+
m_storage->registerManagement(m_mgtClient);
263264

264265
// Setup NotificationManager class
265266
NotificationManager instances(m_name, m_mgtClient, this);

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fledge_version>=2.3
2-
notification_version=2.3.0
1+
fledge_version>=2.4
2+
notification_version=2.4.0

0 commit comments

Comments
 (0)