-
-OCStackResult AddMCPresenceNode(OCMulticastNode** outnode, char* uri, uint32_t nonce)
-{
- if(!outnode)
- {
- return OC_STACK_INVALID_PARAM;
- }
-
- OCMulticastNode *node;
-
- node = (OCMulticastNode*) OICMalloc(sizeof(OCMulticastNode));
-
- if (node)
- {
- node->nonce = nonce;
- node->uri = uri;
- LL_APPEND(mcPresenceNodes, node);
- *outnode = node;
- return OC_STACK_OK;
- }
- *outnode = NULL;
- return OC_STACK_NO_MEMORY;
-}
-
-OCMulticastNode* GetMCPresenceNode(const char * uri)
-{
- OCMulticastNode* out = NULL;
-
- if(uri)
- {
- LL_FOREACH(mcPresenceNodes, out)
- {
- if(out->uri && strcmp(out->uri, uri) == 0)
- {
- return out;
- }
- }
- }
- OC_LOG(INFO, TAG, PCF("MulticastNode Not found !!"));
- return NULL;
-}
-