"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/ntf/ntfd/NtfSubscription.cc" between
opensaf-5.21.06.tar.gz and opensaf-5.21.09.tar.gz

About: OpenSAF is a project focused on Service Availability (SA) that develops middleware based on open and industry standard interfaces for applications requiring uninterrupted 24x7 service.

NtfSubscription.cc  (opensaf-5.21.06):NtfSubscription.cc  (opensaf-5.21.09)
skipping to change at line 26 skipping to change at line 26
*/ */
/** /**
* This object handles information about NTF subscriptions. * This object handles information about NTF subscriptions.
*/ */
#include "ntf/ntfd/NtfSubscription.h" #include "ntf/ntfd/NtfSubscription.h"
#include "base/logtrace.h" #include "base/logtrace.h"
#include "ntf/common/ntfsv_mem.h" #include "ntf/common/ntfsv_mem.h"
#include "ntf/ntfd/NtfClient.h" #include "ntf/ntfd/NtfClient.h"
#include "ntfs.h"
#if DISCARDED_TEST #if DISCARDED_TEST
/* TODO REMOVE TEST */ /* TODO REMOVE TEST */
extern int disc_test_cntr; extern int disc_test_cntr;
#endif #endif
/** /**
* This is the constructor. * This is the constructor.
* *
* Initial variables are set and pointer to the filter object is stored. * Initial variables are set and pointer to the filter object is stored.
skipping to change at line 283 skipping to change at line 284
client->getClientId(), client->getClientId(),
client->getMdsDest()) != NCSCC_RC_SUCCESS) { client->getMdsDest()) != NCSCC_RC_SUCCESS) {
discardedAdd(notification->getNotificationId()); discardedAdd(notification->getNotificationId());
} }
} else { } else {
discardedAdd(notification->getNotificationId()); discardedAdd(notification->getNotificationId());
/* The notification can be confirmed since it is put into discarded /* The notification can be confirmed since it is put into discarded
* list.*/ * list.*/
notificationSentConfirmed(client->getClientId(), getSubscriptionId(), notificationSentConfirmed(client->getClientId(), getSubscriptionId(),
notification->getNotificationId(), 1); notification->getNotificationId(), 1);
} { // Start
// Generate Discarded Ntf Clean up as
// we are not able to send second time.
ntfsv_ntfs_evt_t *evt = NULL;
if (NULL == (evt = reinterpret_cast<ntfsv_ntfs_evt_t *>
(calloc(1, sizeof(ntfsv_ntfs_evt_t))))) {
LOG_WA("mem alloc FAILURE");
goto done;
}
evt->evt_type = NTFSV_NTFS_EVT_NTFA_DOWN;
/** Initialize the Event Header **/
// Filling non-zero to determine an internal event
evt->internal_event = true;
evt->fr_node_id =
m_NTFS_GET_NODE_ID_FROM_ADEST(client->getMdsDest());
evt->fr_dest = client->getMdsDest();
/** Initialize the MDS portion of the header **/
evt->info.mds_info.node_id =
m_NTFS_GET_NODE_ID_FROM_ADEST(client->getMdsDest());
evt->info.mds_info.mds_dest_id = client->getMdsDest();
TRACE("Nodeid: %u, MdsDest: %" PRIu64, evt->info.mds_info.node_id,
evt->info.mds_info.mds_dest_id);
TRACE("mdsDest: %" PRIu64, evt->info.mds_info.mds_dest_id);
/* Push the event and we are done */
if (m_NCS_IPC_SEND(&ntfs_cb->mbx, evt, NCS_IPC_PRIORITY_HIGH) !=
NCSCC_RC_SUCCESS) {
LOG_WA("ipc send failed");
free(evt);
goto done;
}
LOG_ER(
"Down event missed for app with mdsdest: %" PRIu64 " on node: %u",
evt->info.mds_info.mds_dest_id, evt->info.mds_info.node_id);
} // End
}
free(d_info.discardedNotificationIdentifiers); free(d_info.discardedNotificationIdentifiers);
} }
done:
TRACE_LEAVE(); TRACE_LEAVE();
} }
void NtfSubscription::printInfo() { void NtfSubscription::printInfo() {
TRACE("Subscription information"); TRACE("Subscription information");
TRACE(" subscriptionId %u", subscriptionId_); TRACE(" subscriptionId %u", subscriptionId_);
} }
/** /**
* Returns size of discarded list. * Returns size of discarded list.
*/ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)