fixed string coverter for callback parameter related MQ APIs
authorjihwan.seo <jihwan.seo@samsung.com>
Tue, 30 Aug 2016 08:04:31 +0000 (17:04 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Wed, 31 Aug 2016 11:50:08 +0000 (11:50 +0000)
both CreateMQTopic and DiscoveryMQTopics callback
had wrong coverter for uri parameter.

Change-Id: I71f01a473ed5133880e2e50c2d0df7c1c7a7cad6
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11117
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/src/InProcClientWrapper.cpp

index da86f83..e077f01 100644 (file)
@@ -346,7 +346,7 @@ namespace OC
                     << std::flush;
 
             std::thread exec(context->callback, clientResponse->result,
-                             clientResponse->resourceUri, nullptr);
+                             std::string(clientResponse->resourceUri), nullptr);
             exec.detach();
 
             return OC_STACK_DELETE_TRANSACTION;
@@ -369,7 +369,7 @@ namespace OC
             for (auto resource : container.Resources())
             {
                 std::thread exec(context->callback, clientResponse->result,
-                                 clientResponse->resourceUri, resource);
+                                 std::string(clientResponse->resourceUri), resource);
                 exec.detach();
             }
         }
@@ -557,7 +557,7 @@ namespace OC
 
         if (!isLocationOption)
         {
-            createdUri = clientResponse->resourceUri;
+            createdUri = std::string(clientResponse->resourceUri);
         }
 
         auto clientWrapper = context->clientWrapper.lock();
@@ -578,13 +578,17 @@ namespace OC
                                             createdUri);
                 for (auto resource : container.Resources())
                 {
-                    std::thread exec(context->callback, result, createdUri, resource);
+                    std::thread exec(context->callback, result,
+                                     createdUri,
+                                     resource);
                     exec.detach();
                 }
             }
             else
             {
-                std::thread exec(context->callback, result, createdUri, nullptr);
+                std::thread exec(context->callback, result,
+                                 createdUri,
+                                 nullptr);
                 exec.detach();
             }
         }