webrtc : minor code changes 49/254949/5
authorhj kim <backto.kim@samsung.com>
Thu, 11 Mar 2021 02:26:18 +0000 (11:26 +0900)
committerhj kim <backto.kim@samsung.com>
Mon, 15 Mar 2021 03:58:49 +0000 (12:58 +0900)
1. return error directly.
2. Add build option for test codes.

[Version] 0.1.125
[Issue Type] Improvement

Change-Id: I8f4fc393d7adf0d658eadef0e40b1346794dd618

packaging/capi-media-webrtc.spec
src/webrtc.c
test/CMakeLists.txt

index 8647d3a40df354311c2a796fe44552285f8de916..1451356e6af87ca4948ec6a2c2202ddd9b24f823 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.1.124
+Version:    0.1.125
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 84e945e1468212df852bc77ef80d69db38bfc17a..031fec4ad137bbdfcda8703ab50fbe68eccbbf87 100644 (file)
@@ -113,7 +113,9 @@ int webrtc_unset_state_changed_cb(webrtc_h webrtc)
 
 int webrtc_create(webrtc_h *webrtc)
 {
+#ifdef TIZEN_FEATURE_RES_MGR
        int ret = WEBRTC_ERROR_NONE;
+#endif
        webrtc_s *_webrtc = NULL;
 
        RET_ERR_IF_NETWORK_FEATURES_ARE_NOT_SUPPORTED();
@@ -150,7 +152,7 @@ int webrtc_create(webrtc_h *webrtc)
 
        g_mutex_unlock(&_webrtc->mutex);
 
-       return ret;
+       return WEBRTC_ERROR_NONE;
 }
 
 int webrtc_destroy(webrtc_h webrtc)
@@ -218,7 +220,7 @@ int webrtc_start(webrtc_h webrtc)
 
        g_mutex_unlock(&_webrtc->mutex);
 
-       return ret;
+       return WEBRTC_ERROR_NONE;
 }
 
 int webrtc_stop(webrtc_h webrtc)
@@ -855,13 +857,9 @@ int webrtc_create_data_channel(webrtc_h webrtc, const char *label, webrtc_data_c
 
 int webrtc_destroy_data_channel(webrtc_data_channel_h channel)
 {
-       int ret = WEBRTC_ERROR_NONE;
-
        RET_VAL_IF(channel == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "channel is NULL");
 
-       ret = _destroy_data_channel((webrtc_data_channel_s *)channel);
-
-       return ret;
+       return _destroy_data_channel((webrtc_data_channel_s *)channel);
 }
 
 int webrtc_set_data_channel_cb(webrtc_h webrtc, webrtc_data_channel_cb callback, void *user_data)
index 9d92b8d41b0a4bef43616906b4746fc5a8fbbcc8..35a2783909b6d3de7a2d4ebf7a8681e4b92f4744 100644 (file)
@@ -11,7 +11,7 @@ FOREACH(flag ${${fw_test}_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -pie")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -pie -Wall -Werror")
 
 aux_source_directory(. sources)