observationInfo.obsId = obsId;
// Register the observation request with entity handler
- ehRet = resource->entityHandler ((OC_REQUEST_FLAG | OC_OBSERVE_FLAG),
+ ehRet = resource->entityHandler ((OCEntityHandlerFlag)(OC_REQUEST_FLAG | OC_OBSERVE_FLAG),
request->entityHandlerRequest);
if (ehRet == OC_EH_OK)
{
observationInfo.obsId = resObs->observeId;
// Deregister the observation with entity handler. Ignoring return value
// from entity handler and deleting the observation from stack
- resource->entityHandler ((OC_REQUEST_FLAG | OC_OBSERVE_FLAG),
+ resource->entityHandler ((OCEntityHandlerFlag)(OC_REQUEST_FLAG | OC_OBSERVE_FLAG),
request->entityHandlerRequest);
stackRet = DeleteObserverUsingToken (obs->token);
if(stackRet != OC_STACK_OK)
{
ResourceObserver *out = NULL;
- if(token)
+ if(token)
{
- LL_FOREACH (serverObsList, out)
+ LL_FOREACH (serverObsList, out)
{
OC_LOG(INFO, TAG,PCF("comparing tokens"));
OC_LOG_BUFFER(INFO, TAG, token->token, token->tokenLength);
{
ResourceObserver *out = NULL;
ResourceObserver *tmp = NULL;
- LL_FOREACH_SAFE (serverObsList, out, tmp)
+ LL_FOREACH_SAFE (serverObsList, out, tmp)
{
DeleteObserverUsingToken (out->token);
}
// TODO Logging
printf("\tGoing from stack for List of Observers: Payload: %s\n", (char*)pBuffer);
- result = OCNotifyListOfObservers(resourceHandle, &observationIds[0],
+ result = OCNotifyListOfObservers(resourceHandle, &observationIds[0],
observationIds.size(), pBuffer);
delete(pBuffer);
{
throw e;
}
-
- return result;
}
+ return result;
}
void OCPlatform::init(const PlatformConfig& config)
}
}
}
- catch(std::exception e) // TODO : define our own exception
+ catch(std::exception e) // TODO : define our own exception
{
throw e;
}
}
- OCStackResult OCPlatform::startPresence(const unsigned int announceDurationSeconds)
- {
+ OCStackResult OCPlatform::startPresence(const unsigned int announceDurationSeconds)
+ {
if(m_server)
{
return m_server->startPresence(announceDurationSeconds);
}
}
- OCStackResult OCPlatform::subscribePresence(OCPresenceHandle& presenceHandle, const std::string& host,
+ OCStackResult OCPlatform::subscribePresence(OCPresenceHandle& presenceHandle, const std::string& host,
SubscribeCallback presenceHandler)
{
if(m_client)