//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include "NSConsumerCommon.h"
+#include "NSConstants.h"
#include "NSThread.h"
#include "oic_malloc.h"
#include "oic_string.h"
{
if (!NSThreadInit(NSDiscoverdProviderFunc, (void *) provider))
{
- NS_CONSUMER_LOG(ERROR, "execute discovered provider callback fail");
+ NS_LOG(ERROR, "execute discovered provider callback fail");
return;
}
}
if (!NSThreadInit(NSNotificationSyncFunc, (void *) obj))
{
- NS_CONSUMER_LOG(ERROR, "execute noti post callback fail");
+ NS_LOG(ERROR, "execute noti post callback fail");
return;
}
}
NSMessageData * obj = (NSMessageData *)OICMalloc(sizeof(NSMessageData));
if (!obj)
{
- NS_CONSUMER_LOG(ERROR, "NSMessageData allocation is failed");
+ NS_LOG(ERROR, "NSMessageData allocation is failed");
return;
}
obj->provider = provider;
if (!NSThreadInit(NSNotificationPostFunc, (void *) obj))
{
- NS_CONSUMER_LOG(ERROR, "execute noti post callback fail");
+ NS_LOG(ERROR, "execute noti post callback fail");
return;
}
}
newMsg->addr = (OCDevAddr *)OICMalloc(sizeof(OCDevAddr));
if (!newMsg->addr)
{
- NS_CONSUMER_LOG(ERROR, "OCDevAddr allocation is failed");
+ NS_LOG(ERROR, "OCDevAddr allocation is failed");
}
memcpy(newMsg->addr, msg->addr, sizeof(OCDevAddr));
payload, CT_DEFAULT, NS_QOS, &cbdata, NULL, 0);
}
-const char * NS_CONVERT_LEVEL(int level)
-{
- return ((level) == 0) ? "DEBUG" :
- ((level) == 1) ? "INFO" :
- ((level) == 2) ? "WARNING" :
- ((level) == 3) ? "ERROR" : "FATAL";
-}