if (ctx && *((NSConsumerDiscoverType *)ctx) == NS_DISCOVER_CLOUD )
{
newProvider->connection->isCloudConnection = true;
- NSOICFree(ctx);
}
NS_LOG(DEBUG, "build NSTask");
void NSConsumerHandleRequestDiscover(OCDevAddr * address, NSConsumerDiscoverType rType)
{
- OCConnectivityType type = CT_DEFAULT;
+ OCConnectivityType type = CT_ADAPTER_IP;
NSConsumerDiscoverType * callbackData = NULL;
if (address)
{
if (address->adapter == OC_ADAPTER_IP)
{
- type = CT_ADAPTER_IP;
NS_LOG(DEBUG, "Request discover [UDP]");
}
else if (address->adapter == OC_ADAPTER_TCP)
if (rType == NS_DISCOVER_CLOUD)
{
- callbackData = (NSConsumerDiscoverType *)OICMalloc(sizeof(NSConsumerDiscoverType));
*callbackData = NS_DISCOVER_CLOUD;
}
}