Fixed bug for uri on subscription request. 41/8741/2
authorKIM JungYong <jyong2.kim@samsung.com>
Fri, 17 Jun 2016 00:48:42 +0000 (09:48 +0900)
committerUze Choi <uzchoi@samsung.com>
Fri, 17 Jun 2016 05:04:28 +0000 (05:04 +0000)
when send subscription request,
device id on query parameter should be inserted request uri.

Change-Id: I1b59bf2b61b2922a772c851662e90a9aea7d802d
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/8741
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/src/consumer/NSConsumerCommunication.c

index f4ecec2..6f0ad95 100644 (file)
@@ -51,9 +51,10 @@ NSResult NSConsumerSubscribeProvider(NSProvider * provider)
     NS_VERTIFY_NOT_NULL(query, NS_ERROR);
 
     NS_LOG(DEBUG, "subscribe message");
+    NS_LOG_V(DEBUG, "subscribe query : %s", query);
     OCStackResult ret = NSInvokeRequest(&(provider_internal->messageHandle),
                           OC_REST_OBSERVE, provider_internal->addr,
-                          provider_internal->messageUri, NULL, NSConsumerMessageListener, NULL);
+                          query, NULL, NSConsumerMessageListener, NULL);
     NS_VERTIFY_STACK_OK(ret, NS_ERROR);
     NSOICFree(query);
 
@@ -62,9 +63,10 @@ NSResult NSConsumerSubscribeProvider(NSProvider * provider)
     NS_VERTIFY_NOT_NULL(query, NS_ERROR);
 
     NS_LOG(DEBUG, "subscribe sync");
+    NS_LOG_V(DEBUG, "subscribe query : %s", query);
     ret = NSInvokeRequest(&(provider_internal->syncHandle),
                           OC_REST_OBSERVE, provider_internal->addr,
-                          provider_internal->syncUri, NULL, NSConsumerSyncInfoListener, NULL);
+                          query, NULL, NSConsumerSyncInfoListener, NULL);
     NS_VERTIFY_STACK_OK(ret, NS_ERROR);
     NSOICFree(query);