NSDuplicateSetPropertyString(msgPayload, NS_ATTRIBUTE_TITLE, msg->title);
NSDuplicateSetPropertyString(msgPayload, NS_ATTRIBUTE_TEXT, msg->contentText);
NSDuplicateSetPropertyString(msgPayload, NS_ATTRIBUTE_SOURCE, msg->sourceName);
+ NSDuplicateSetPropertyString(msgPayload, NS_ATTRIBUTE_TOPIC_NAME, msg->topic);
NS_LOG(DEBUG, "NSSetMessagePayload - OUT");
return NS_OK;
currList = consumerTopicList->head;\r
}\r
\r
+ if(!currList)\r
+ {\r
+ NS_LOG(DEBUG, "currList is NULL");\r
+ return NS_ERROR;\r
+ }\r
+\r
// make response for the Get Request\r
OCEntityHandlerResponse response;\r
response.numSendVendorSpecificHeaderOptions = 0;\r
NSCacheElement * iter = currList;\r
size_t dimensionSize = (size_t)NSProviderGetListSize(iter);\r
\r
+ NS_LOG_V(DEBUG, "dimensionSize = %d", dimensionSize);\r
+\r
if(!dimensionSize)\r
{\r
return NS_ERROR;\r
{\r
NSTopicLL * topic = (NSTopicLL *) iter->data;\r
\r
+ NS_LOG_V(DEBUG, "topicName = %s", topic->topicName);\r
+ NS_LOG_V(DEBUG, "topicState = %d",(int) topic->state);\r
+\r
payloadTopicArray[i] = OCRepPayloadCreate();\r
OCRepPayloadSetPropString(payloadTopicArray[i], NS_ATTRIBUTE_TOPIC_NAME, topic->topicName);\r
OCRepPayloadSetPropInt(payloadTopicArray[i], NS_ATTRIBUTE_TOPIC_SELECTION,\r
}\r
\r
OCRepPayloadSetUri(payload, NS_COLLECTION_TOPIC_URI);\r
- OCRepPayloadSetPropString(payload, NS_ATTRIBUTE_CONSUMER_ID, id);\r
+ if(id)\r
+ {\r
+ OCRepPayloadSetPropString(payload, NS_ATTRIBUTE_CONSUMER_ID, id);\r
+ }\r
OCRepPayloadSetPropObjectArray(payload, NS_ATTRIBUTE_TOPIC_LIST,\r
(const OCRepPayload**)(payloadTopicArray), dimensions);\r
\r