aboutsummaryrefslogtreecommitdiffstats
path: root/metis/ccnx/forwarder
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2019-02-14 11:06:29 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-02-14 13:57:25 +0100
commite59f9c7e0d731e02aa31c9092ce47f3aaa4d51bc (patch)
tree99ff53c69af5135a1e8d9aee2a033ca47575880c /metis/ccnx/forwarder
parentffee4d39ba3b92bedd1099ea66e0ae6b9a288090 (diff)
[CICN-16] Correct compilation error metissb-forwarder/master
Change-Id: I5df7993240c57202f012203c82304eeda641826f Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'metis/ccnx/forwarder')
-rw-r--r--metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c9
-rw-r--r--metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c15
-rw-r--r--metis/ccnx/forwarder/metis/core/metis_Wldr.c7
-rw-r--r--metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c5
-rw-r--r--metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c5
5 files changed, 23 insertions, 18 deletions
diff --git a/metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c b/metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c
index 59e4c5a8..129d2dc0 100644
--- a/metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c
+++ b/metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c
@@ -25,6 +25,7 @@
#include <parc/algol/parc_Object.h>
#include <parc/algol/parc_ArrayList.h>
#include <parc/algol/parc_List.h>
+#include <parc/assert/parc_Assert.h>
#include <ccnx/forwarder/metis/config/metis_ConfigurationFile.h>
#include <ccnx/forwarder/metis/config/metis_Configuration.h>
#include <ccnx/forwarder/metis/config/metis_ControlState.h>
@@ -206,8 +207,8 @@ parcObject_ImplementRelease(metisConfigurationFile, MetisConfigurationFile);
MetisConfigurationFile *
metisConfigurationFile_Create(MetisForwarder *metis, const char *filename)
{
- assertNotNull(metis, "Parameter metis must be non-null");
- assertNotNull(filename, "Parameter filename must be non-null");
+ parcAssertNotNull(metis, "Parameter metis must be non-null");
+ parcAssertNotNull(filename, "Parameter filename must be non-null");
MetisConfigurationFile *configFile = parcObject_CreateInstance(MetisConfigurationFile);
@@ -215,7 +216,7 @@ metisConfigurationFile_Create(MetisForwarder *metis, const char *filename)
configFile->linesRead = 0;
configFile->metis = metis;
configFile->filename = parcMemory_StringDuplicate(filename, strlen(filename));
- assertNotNull(configFile->filename, "Could not copy string '%s'", filename);
+ parcAssertNotNull(configFile->filename, "Could not copy string '%s'", filename);
// setup the control state for the command parser
configFile->controlState = metisControlState_Create(configFile, _writeRead);
@@ -252,7 +253,7 @@ metisConfigurationFile_Create(MetisForwarder *metis, const char *filename)
bool
metisConfigurationFile_Process(MetisConfigurationFile *configFile)
{
- assertNotNull(configFile, "Parameter configFile must be non-null");
+ parcAssertNotNull(configFile, "Parameter configFile must be non-null");
// default to a "true" return value and only set to false if we encounter an error.
bool success = true;
diff --git a/metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c b/metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c
index 82095882..727b2b2b 100644
--- a/metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c
+++ b/metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c
@@ -20,6 +20,7 @@
#include <parc/algol/parc_Object.h>
#include <parc/algol/parc_HashCodeTable.h>
#include <parc/algol/parc_DisplayIndented.h>
+#include <parc/assert/parc_Assert.h>
#include <ccnx/forwarder/metis/core/metis_Logger.h>
@@ -299,10 +300,10 @@ _metisLRUContentStore_PutContent(MetisContentStoreInterface *storeImpl, MetisMes
{
bool result = false;
_MetisLRUContentStore *store = (_MetisLRUContentStore *) metisContentStoreInterface_GetPrivateData(storeImpl);
- assertNotNull(store, "Parameter store must be non-null");
- assertNotNull(content, "Parameter objectMessage must be non-null");
+ parcAssertNotNull(store, "Parameter store must be non-null");
+ parcAssertNotNull(content, "Parameter objectMessage must be non-null");
- assertTrue(metisMessage_GetType(content) == MetisMessagePacketType_ContentObject,
+ parcAssertTrue(metisMessage_GetType(content) == MetisMessagePacketType_ContentObject,
"Parameter objectMessage must be a Content Object");
if (store->objectCapacity == 0) {
@@ -383,9 +384,9 @@ _metisLRUContentStore_MatchInterest(MetisContentStoreInterface *storeImpl, Metis
_MetisLRUContentStore *store = (_MetisLRUContentStore *) metisContentStoreInterface_GetPrivateData(storeImpl);
- assertNotNull(store, "Parameter store must be non-null");
- assertNotNull(interest, "Parameter interestMessage must be non-null");
- assertTrue(metisMessage_GetType(interest) == MetisMessagePacketType_Interest,
+ parcAssertNotNull(store, "Parameter store must be non-null");
+ parcAssertNotNull(interest, "Parameter interestMessage must be non-null");
+ parcAssertTrue(metisMessage_GetType(interest) == MetisMessagePacketType_Interest,
"Parameter interestMessage must be an Interest");
// This will do the most restrictive lookup.
@@ -491,7 +492,7 @@ metisLRUContentStore_Create(MetisContentStoreConfig *config, MetisLogger *logger
{
MetisContentStoreInterface *storeImpl = NULL;
- assertNotNull(logger, "MetisLRUContentStore requires a non-NULL logger");
+ parcAssertNotNull(logger, "MetisLRUContentStore requires a non-NULL logger");
storeImpl = parcObject_CreateAndClearInstance(MetisContentStoreInterface);
diff --git a/metis/ccnx/forwarder/metis/core/metis_Wldr.c b/metis/ccnx/forwarder/metis/core/metis_Wldr.c
index 6249bf0a..61029fa6 100644
--- a/metis/ccnx/forwarder/metis/core/metis_Wldr.c
+++ b/metis/ccnx/forwarder/metis/core/metis_Wldr.c
@@ -20,6 +20,7 @@
#include <ccnx/forwarder/metis/core/metis_Wldr.h>
#include <ccnx/forwarder/metis/core/metis_Forwarder.h>
#include <parc/logging/parc_LogReporterTextStdout.h>
+#include <parc/assert/parc_Assert.h>
struct metis_wldr_buffer {
MetisMessage *message;
@@ -38,12 +39,12 @@ MetisWldr *
metisWldr_Init()
{
MetisWldr *wldr = parcMemory_AllocateAndClear(sizeof(MetisWldr));
- assertNotNull(wldr, "parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(MetisWldr));
+ parcAssertNotNull(wldr, "parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(MetisWldr));
wldr->expected_label = 1;
wldr->next_label = 1;
for (int i = 0; i < BUFFER_SIZE; i++) {
MetisWldrBuffer *entry = parcMemory_AllocateAndClear(sizeof(MetisWldrBuffer));
- assertNotNull(entry, "WldrBuffer init: parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(MetisWldrBuffer));
+ parcAssertNotNull(entry, "WldrBuffer init: parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(MetisWldrBuffer));
entry->message = NULL;
entry->rtx_counter = 0;
wldr->buffer[i] = entry;
@@ -112,7 +113,7 @@ _metisWldr_SendWldrNotificaiton(MetisWldr *wldr, const MetisConnection *conn, Me
MetisMessage *notification = metisMessage_Slice(message, 0, metisMessage_Length(message), 0, NULL);
metisMessage_SetWldrNotification(notification, expected_lbl, received_lbl);
//printf("------------send notification %u, %u\n",expected_lbl, received_lbl);
- assertNotNull(notification, "Got null from Slice");
+ parcAssertNotNull(notification, "Got null from Slice");
metisConnection_ReSend(conn, notification);
}
diff --git a/metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c b/metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c
index 839ece06..7f39bb2d 100644
--- a/metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c
+++ b/metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c
@@ -18,6 +18,7 @@
#include <parc/algol/parc_Memory.h>
#include <parc/algol/parc_Object.h>
+#include <parc/assert/parc_Assert.h>
#include <parc/algol/parc_DisplayIndented.h>
#include <ccnx/forwarder/metis/strategies/strategy_NexthopState.h>
@@ -52,7 +53,7 @@ parcObject_Override(StrategyNexthopState, PARCObject,
void
strategyNexthopState_AssertValid(const StrategyNexthopState *instance)
{
- assertTrue(strategyNexthopState_IsValid(instance),
+ parcAssertTrue(strategyNexthopState_IsValid(instance),
"StrategyNexthopState is not valid.");
}
@@ -188,7 +189,7 @@ char *
strategyNexthopState_ToString(const StrategyNexthopState *x)
{
//this is not implemented
- trapNotImplemented("strategyNexthopState_ToString is not implemented");
+ parcTrapNotImplemented("strategyNexthopState_ToString is not implemented");
return NULL;
}
diff --git a/metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c b/metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c
index e93c5b6b..2e35968d 100644
--- a/metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c
+++ b/metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c
@@ -20,6 +20,7 @@
#include <parc/algol/parc_Memory.h>
#include <parc/algol/parc_Object.h>
+#include <parc/assert/parc_Assert.h>
#include <parc/algol/parc_DisplayIndented.h>
#include <ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.h>
@@ -55,7 +56,7 @@ parcObject_Override(StrategyNexthopStateWithPD, PARCObject,
void
strategyNexthopStateWithPD_AssertValid(const StrategyNexthopStateWithPD *instance)
{
- assertTrue(strategyNexthopStateWithPD_IsValid(instance),
+ parcAssertTrue(strategyNexthopStateWithPD_IsValid(instance),
"StrategyNexthopStateWithPD is not valid.");
}
@@ -201,7 +202,7 @@ char *
strategyNexthopStateWithPD_ToString(const StrategyNexthopStateWithPD *x)
{
//this is not implemented
- trapNotImplemented("strategyNexthopStateWithPD_ToString is not implemented");
+ parcTrapNotImplemented("strategyNexthopStateWithPD_ToString is not implemented");
return NULL;
}