[UTC/ITC][iotcon][Non-ACR]add udp conn type while finding resource
authorJooseok Park <jooseok.park@samsung.com>
Wed, 4 Jan 2017 02:03:18 +0000 (11:03 +0900)
committerJooseok Park <jooseok.park@samsung.com>
Wed, 4 Jan 2017 02:06:56 +0000 (11:06 +0900)
 - when tcp coap msg is coming from iotivity stack, unwanted result occurs.
 - so, use connectivy type explicitly

Change-Id: I36cb2a695291e00eefd531311afb3866b9b65eb3

30 files changed:
src/itc/iotcon/ITs-iotcon-common.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-device.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-list.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-lite-resource.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-observers.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-options.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-presence-response.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-presence.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-query.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-remote-resource.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-representation.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-request.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-resource.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-response.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-serive.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon-state.c [changed mode: 0755->0644]
src/itc/iotcon/ITs-iotcon.c [changed mode: 0755->0644]
src/itc/iotcon/tct-iotcon-native.c [changed mode: 0755->0644]
src/utc/iotcon/tct-iotcon-core.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-common.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-device.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-encap.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-presence-response.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-presence.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-remote-resource.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-representation.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-resource.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-service.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon-struct.c [changed mode: 0755->0644]
src/utc/iotcon/utc-iotcon.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index b84daf3..e201f4c
@@ -249,7 +249,7 @@ static bool FoundResourceCB(iotcon_remote_resource_h resource, iotcon_error_e er
                        iotcon_query_destroy(hQuery);
                        return false;
                }
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_ALL,hQuery, FoundResourceCB, user_data);
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,hQuery, FoundResourceCB, user_data);
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE,IotConGetError(nRet));
@@ -329,7 +329,7 @@ static int CreateAndFindResource(int tc_index)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet), iotcon_query_destroy(hQuery);DestroyResource());
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_ALL , hQuery, FoundResourceCB, GINT_TO_POINTER(tc_index));
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP , hQuery, FoundResourceCB, GINT_TO_POINTER(tc_index));
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet), DestroyResource();iotcon_query_destroy(hQuery));
 
        nRet = iotcon_query_destroy(hQuery);
old mode 100755 (executable)
new mode 100644 (file)
index 1861e75..ed602cb
@@ -141,7 +141,7 @@ static bool presence_found_resource(iotcon_remote_resource_h resource,
                        iotcon_query_destroy(hQuery);
                        return false;
                }
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,hQuery, presence_found_resource, GINT_TO_POINTER(tc_index));
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,hQuery, presence_found_resource, GINT_TO_POINTER(tc_index));
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE, IotConGetError(nRet));
@@ -300,7 +300,7 @@ static int CreateAndFindResource(int tc_index)
                iotcon_query_destroy(hQuery);
                return false;
        }
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,hQuery, presence_found_resource, GINT_TO_POINTER(tc_index));
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,hQuery, presence_found_resource, GINT_TO_POINTER(tc_index));
        if (IOTCON_ERROR_NONE != nRet)
        {
                FPRINTF("[Line : %d][%s] Handle iotcon_remote_resource_h is null in presence_found_resource callback. : %s\\n", __LINE__, API_NAMESPACE,IotConGetError(nRet));
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 34c08e3..2634e0d
@@ -218,7 +218,7 @@ static bool IotcoRemoteResourceMonitoringCB(iotcon_remote_resource_h resource, i
                        iotcon_query_destroy(hquery);
                        return false;
                }
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hquery, IotcoRemoteResourceMonitoringCB , NULL);
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hquery, IotcoRemoteResourceMonitoringCB , NULL);
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE, IotConGetError(nRet));
@@ -338,7 +338,7 @@ static bool IotconRemoteResourceCachingCB(iotcon_remote_resource_h resource,iotc
                nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
                PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
                
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery,  IotconRemoteResourceCachingCB, NULL);
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery,  IotconRemoteResourceCachingCB, NULL);
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE, IotConGetError(nRet));
@@ -440,7 +440,7 @@ static bool IotconRemoteResourceRepresentationCB(iotcon_remote_resource_h resour
                nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
                PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, IotconRemoteResourceRepresentationCB, NULL);
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, IotconRemoteResourceRepresentationCB, NULL);
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE, IotConGetError(nRet));
@@ -539,7 +539,7 @@ static bool IotconRemoteResourceRepresentationCB(iotcon_remote_resource_h resour
                nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
                PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,hQuery, IotconRemoteResourceOptionsCB, NULL);
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,hQuery, IotconRemoteResourceOptionsCB, NULL);
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE, IotConGetError(nRet));
@@ -824,7 +824,7 @@ static bool IotconRemoteResourceGetPutPostDelCB(iotcon_remote_resource_h resourc
                nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
                PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
                
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, IotconRemoteResourceGetPutPostDelCB, NULL);
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, IotconRemoteResourceGetPutPostDelCB, NULL);
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE, IotConGetError(nRet));
@@ -1014,7 +1014,7 @@ static bool IotconRemoteResourceObserveCB(iotcon_remote_resource_h resource, iot
                nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
                PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
                
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, IotconRemoteResourceObserveCB, NULL);
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, IotconRemoteResourceObserveCB, NULL);
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE, IotConGetError(nRet));
@@ -1303,7 +1303,7 @@ int ITc_iotcon_remote_resource_observe_register_deregister_p(void)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, IotconRemoteResourceObserveCB, NULL);
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, IotconRemoteResourceObserveCB, NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet),IotconDestroyLiteResource();iotcon_query_destroy(hQuery));
        RUN_POLLING_LOOP;
 
@@ -1363,7 +1363,7 @@ int ITc_iotcon_remote_resource_get_put_post_delete_p(void)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, IotconRemoteResourceGetPutPostDelCB, NULL);
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, IotconRemoteResourceGetPutPostDelCB, NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet),IotconDestroyLiteResource();iotcon_query_destroy(hQuery));
        RUN_POLLING_LOOP;
 
@@ -1423,7 +1423,7 @@ int ITc_iotcon_remote_resource_start_stop_caching_p(void)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, IotconRemoteResourceCachingCB, NULL);
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, IotconRemoteResourceCachingCB, NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet), IotconDestroyLiteResource(); iotcon_query_destroy(hQuery));
        RUN_POLLING_LOOP;
 
@@ -1478,7 +1478,7 @@ int ITc_iotcon_remote_resource_start_stop_monitoring_p(void)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, IotcoRemoteResourceMonitoringCB , NULL);
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, IotcoRemoteResourceMonitoringCB , NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet), IotconDestroyResource();iotcon_query_destroy(hQuery));
        RUN_POLLING_LOOP;
 
@@ -1653,7 +1653,7 @@ int ITc_iotcon_remote_resource_get_device_id_p(void)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,hQuery, IotconRemoteResourceOptionsCB, NULL);
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,hQuery, IotconRemoteResourceOptionsCB, NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet), IotconDestroyLiteResource();iotcon_query_destroy(hQuery););
        RUN_POLLING_LOOP;
 
@@ -1835,7 +1835,7 @@ int ITc_iotcon_remote_resource_set_get_options_p(void)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,hQuery,IotconRemoteResourceOptionsCB, NULL);
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,hQuery,IotconRemoteResourceOptionsCB, NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet), IotconDestroyLiteResource(); iotcon_query_destroy(hQuery));
        RUN_POLLING_LOOP;
 
@@ -1909,7 +1909,7 @@ int ITc_iotcon_remote_resource_get_cached_representation_p(void)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, IotconRemoteResourceRepresentationCB, NULL);
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, IotconRemoteResourceRepresentationCB, NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet), IotconDestroyLiteResource();iotcon_query_destroy(hQuery));
        RUN_POLLING_LOOP;
 
@@ -2007,7 +2007,7 @@ int ITc_remote_resource_get_device_name_p(void)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,hQuery,IotconRemoteResourceOptionsCB, NULL);
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,hQuery,IotconRemoteResourceOptionsCB, NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet), IotconDestroyLiteResource();iotcon_query_destroy(hQuery));
        RUN_POLLING_LOOP;
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 51e6c42..05dfc51
@@ -349,7 +349,7 @@ static bool FoundResourceCB(iotcon_remote_resource_h resource,
                        iotcon_query_destroy(query);
                        return false;
                }
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                query, FoundResourceCB, NULL);
                if (IOTCON_ERROR_NONE != nRet)
                {
@@ -464,7 +464,7 @@ static int CreateAndFindResource(int tc_index)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
 
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        hQuery, FoundResourceCB, NULL);
        if (IOTCON_ERROR_NONE != nRet)
        {
old mode 100755 (executable)
new mode 100644 (file)
index 7d759dd..e8270b1
@@ -741,7 +741,7 @@ static bool FoundResourceCB(iotcon_remote_resource_h resource,iotcon_error_e err
                        iotcon_query_destroy(hquery);
                        return false;
                }
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                hquery, FoundResourceCB, user_data);
                if (IOTCON_ERROR_NONE != nRet) {
                        FPRINTF("iotcon_find_resource() Fail(%d)", nRet);
@@ -842,7 +842,7 @@ static int CreateAndFindResource(int tc_index)
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
        
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        hQuery, FoundResourceCB, (void *)tc_index);
        if (IOTCON_ERROR_NONE != nRet) {
                FPRINTF("iotcon_find_resource() Fail(%d)", nRet);
old mode 100755 (executable)
new mode 100644 (file)
index 789b8ae..d02c836
@@ -157,7 +157,7 @@ static bool FoundResourceCB(iotcon_remote_resource_h resource,
                        iotcon_query_destroy(hQuery);
                        return false;
                }
-               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP, hQuery, FoundResourceCB, NULL);
+               nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP, hQuery, FoundResourceCB, NULL);
                if (IOTCON_ERROR_NONE != nRet)
                {
                        FPRINTF("[Line : %d][%s] iotcon_find_resource fail in startup error returned : %s\\n", __LINE__, API_NAMESPACE, IotConGetError(nRet));
@@ -228,7 +228,7 @@ static int CreateAndFindResource()
        nRet = iotcon_query_set_resource_type(hQuery, LIGHT_RESOURCE_TYPE);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_query_set_resource_type", IotConGetError(nRet),iotcon_query_destroy(hQuery));
 
-       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       nRet = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        hQuery, FoundResourceCB, NULL);
        PRINT_RESULT_CLEANUP(IOTCON_ERROR_NONE, nRet, "iotcon_find_resource", IotConGetError(nRet),iotcon_query_destroy(hQuery));
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 22b2a93..e709f79
@@ -273,7 +273,7 @@ static bool _encap_found_resource(iotcon_remote_resource_h resource,
                        return IOTCON_FUNC_STOP;
                }
 
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                query, _encap_found_resource, user_data);
                if (IOTCON_ERROR_NONE != ret) {
                        ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -474,7 +474,7 @@ static int _encap_handle_async(int tc_index)
                return 1;
        }
 
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        query, _encap_found_resource, (void *)tc_index);
        iotcon_query_destroy(query);
        ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_NONE);
old mode 100755 (executable)
new mode 100644 (file)
index 52bd863..32b6485
@@ -275,7 +275,7 @@ static bool _found_resource(iotcon_remote_resource_h resource, iotcon_error_e er
                        return IOTCON_FUNC_STOP;
                }
 
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_ALL,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                query, _found_resource, user_data);
                if (IOTCON_ERROR_NONE != ret) {
                        ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -335,7 +335,7 @@ static int _handle_presence_response_async(int tc_index)
        }
 
 
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_ALL,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        query, _found_resource, GINT_TO_POINTER(tc_index));
        if (IOTCON_ERROR_NONE != ret) {
                ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
old mode 100755 (executable)
new mode 100644 (file)
index 84b484a..4131ebf
@@ -179,7 +179,7 @@ static bool _presence_found_resource(iotcon_remote_resource_h resource,
                        return IOTCON_FUNC_STOP;
                }
 
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                query, _presence_found_resource, user_data);
                if (IOTCON_ERROR_NONE != ret) {
                        ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -419,7 +419,7 @@ static int _presence_handle_async(int tc_index)
                return 1;
        }
 
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        query, _presence_found_resource, (void *)tc_index);
 
        iotcon_query_destroy(query);
old mode 100755 (executable)
new mode 100644 (file)
index 9678ab8..eb62fe9
@@ -846,7 +846,7 @@ static bool _remote_resource_found_resource(iotcon_remote_resource_h resource,
                        return IOTCON_FUNC_STOP;
                }
 
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                query, _remote_resource_found_resource, user_data);
                if (IOTCON_ERROR_NONE != ret) {
                        ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -1270,7 +1270,7 @@ static int _remote_resource_handle_async(int tc_index)
                return 1;
        }
 
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        query, _remote_resource_found_resource, (void *)tc_index);
        if (IOTCON_ERROR_NONE != ret) {
                ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -1317,7 +1317,7 @@ static int _remote_resource_lite_handle_async(int tc_index)
                return 1;
        }
 
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        query, _remote_resource_found_resource, (void *)tc_index);
        if (IOTCON_ERROR_NONE != ret) {
                ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index ed20174..04b3efb
@@ -503,7 +503,7 @@ static bool _found_resource(iotcon_remote_resource_h resource,
                        return IOTCON_FUNC_STOP;
                }
 
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                query, _found_resource, user_data);
                if (IOTCON_ERROR_NONE != ret) {
                        ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -599,7 +599,7 @@ static int _resource_handle_async(int tc_index)
                iotcon_query_destroy(query);
                return 1;
        }
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        query, _found_resource, (void *)tc_index);
        if (IOTCON_ERROR_NONE != ret) {
                ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index ec8b729..a30fec0
@@ -1027,7 +1027,7 @@ static bool _struct_found_resource(iotcon_remote_resource_h resource,
                        return IOTCON_FUNC_STOP;
                }
 
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                query, _struct_found_resource, user_data);
                if (IOTCON_ERROR_NONE != ret) {
                        ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -1177,7 +1177,7 @@ static int _struct_handle_async(int tc_index)
                return 1;
        }
 
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        query, _struct_found_resource, (void *)tc_index);
        if (IOTCON_ERROR_NONE != ret) {
                ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
old mode 100755 (executable)
new mode 100644 (file)
index 9217c85..a23c0a4
@@ -155,7 +155,7 @@ static bool _found_resource(iotcon_remote_resource_h resource, iotcon_error_e er
                        return IOTCON_FUNC_STOP;
                }
 
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                query, _found_resource, user_data);
                if (IOTCON_ERROR_NONE != ret) {
                        ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -206,7 +206,7 @@ static int _handle_async(int tc_index)
                return 1;
        }
 
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        query, _found_resource, (void *)tc_index);
        if (IOTCON_ERROR_NONE != ret) {
                ICUTC_ERR("iotcon_find_resource() Fail(%d)", ret);
@@ -440,14 +440,14 @@ int utc_iotcon_find_resource_n(void)
        int ret;
 
        if (false == g_feature) {
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                NULL, NULL, NULL);
                ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
        /* cb is NULL */
-       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                        NULL, NULL, NULL);
        ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_INVALID_PARAMETER);
 
@@ -464,7 +464,7 @@ int utc_iotcon_find_resource_p(void)
        int ret;
 
        if (false == g_feature) {
-               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP,
+               ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, IOTCON_CONNECTIVITY_IP |IOTCON_CONNECTIVITY_PREFER_UDP,
                                NULL, _found_resource, NULL);
                ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_NOT_SUPPORTED);
                return 0;