printf("id : %s\n", notification->mId);
printf("title : %s\n", notification->mTitle);
printf("content : %s\n", notification->mContentText);
+ printf("source : %s\n", notification->mSource);
// NSDropNSObject(notification);
NSConsumerReadCheck(notification);
}
newMsg->mId = OICStrdup(msg->mId);
newMsg->mTitle = OICStrdup(msg->mTitle);
newMsg->mContentText = OICStrdup(msg->mContentText);
+ newMsg->mSource = OICStrdup(msg->mSource);
newMsg->addr = (OCDevAddr *)OICMalloc(sizeof(OCDevAddr));
if (!newMsg->addr)
{
OICFree(msg->mContentText);
msg->mContentText = NULL;
}
+ if (msg->mSource)
+ {
+ OICFree(msg->mSource);
+ msg->mSource = NULL;
+ }
if (msg->addr)
{
OICFree(msg->addr);
retNoti->mId = NULL;
retNoti->mTitle = NULL;
retNoti->mContentText = NULL;
+ retNoti->mSource = NULL;
OCRepPayload * payload = (OCRepPayload *)clientResponse->payload;
if (!OCRepPayloadGetPropString(payload, NS_ATTRIBUTE_ID, &retNoti->mId))
OCRepPayloadGetPropString(payload, NS_ATTRIBUTE_TITLE, &retNoti->mTitle);
OCRepPayloadGetPropString(payload, NS_ATTRIBUTE_TEXT, &retNoti->mContentText);
+ OCRepPayloadGetPropString(payload, NS_ATTRIBUTE_SOURCE, &retNoti->mSource);
NS_LOG_V(DEBUG, "Msg Address : %s", clientResponse->addr->addr);
NS_LOG_V(DEBUG, "Msg ID : %s", retNoti->mId);
NS_LOG_V(DEBUG, "Msg Title : %s", retNoti->mTitle);
NS_LOG_V(DEBUG, "Msg Content : %s", retNoti->mContentText);
+ NS_LOG_V(DEBUG, "Msg Source : %s", retNoti->mSource);
retNoti->addr = (OCDevAddr *)OICMalloc(sizeof(OCDevAddr));
memcpy(retNoti->addr, clientResponse->addr, sizeof(OCDevAddr));