modified return type of iotcon_found_resource callback 48/75148/1
authorkmook <kmook.choi@samsung.com>
Fri, 17 Jun 2016 01:04:09 +0000 (10:04 +0900)
committerkmook <kmook.choi@samsung.com>
Fri, 17 Jun 2016 01:04:09 +0000 (10:04 +0900)
Change-Id: I75b6bbd417f96d89c2c4d9864d6cde95319ceefc
Signed-off-by: kmook <kmook.choi@samsung.com>
daemon/discovery_provider/iotcon_discovery_provider.cpp
daemon/discovery_provider/iotcon_discovery_provider.h

index e7edd7f..63b0f4a 100755 (executable)
@@ -313,19 +313,21 @@ int conv::iotcon_discovery_provider::add_iot_resource(iotcon_remote_resource_h r
        return CONV_ERROR_NONE;
 }
 
-void conv::iotcon_discovery_provider::_found_resource(iotcon_remote_resource_h resource, iotcon_error_e result, void *user_data)
+bool conv::iotcon_discovery_provider::_found_resource(iotcon_remote_resource_h resource, iotcon_error_e result, void *user_data)
 {
        _D("_found_resource called..");
 
-       IF_FAIL_VOID_TAG((resource != NULL), _E, "resource is NULL..");
+       IF_FAIL_RETURN_TAG((resource != NULL), IOTCON_FUNC_STOP, _E, "resource is NULL..");
 
        int ret;
        // add the found resource into Temp cache
        ret = add_iot_resource(resource);
-       IF_FAIL_VOID_TAG((ret == CONV_ERROR_NONE), _E, "Failed to add iot resource");
+       IF_FAIL_RETURN_TAG((ret == CONV_ERROR_NONE), IOTCON_FUNC_CONTINUE, _E, "Failed to add iot resource");
 
        // Get additional info from resource
        _get_detail_info(resource);
+
+       return IOTCON_FUNC_CONTINUE;
 }
 
 int conv::iotcon_discovery_provider::start()
index ebd717a..06835f2 100755 (executable)
@@ -33,7 +33,7 @@ namespace conv {
        class iotcon_discovery_provider : public discovery_provider_base  {
                private:
 
-                       static void _found_resource(iotcon_remote_resource_h resource, iotcon_error_e result,
+                       static bool _found_resource(iotcon_remote_resource_h resource, iotcon_error_e result,
                                                                        void *user_data);
                        static void _get_detail_info(iotcon_remote_resource_h resource);