From: Sangchul Lee Date: Thu, 28 Oct 2021 03:27:15 +0000 (+0900) Subject: webrtc_test: Fix to add ice candidate to the valid handle X-Git-Tag: submit/tizen/20211028.055213^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87debfd6278146cd3cd3c91fc9ffd3504a6be7ea;p=platform%2Fcore%2Fapi%2Fwebrtc.git webrtc_test: Fix to add ice candidate to the valid handle [Version] 0.2.143 [Issue Type] Bug fix Change-Id: Ic3c8a754382b222d74143fd8062146449d20d842 Signed-off-by: Sangchul Lee --- diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 7c5552f1..6a94242a 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 0.2.142 +Version: 0.2.143 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/test/webrtc_test.c b/test/webrtc_test.c index fa6ce641..1f203ccd 100644 --- a/test/webrtc_test.c +++ b/test/webrtc_test.c @@ -1310,9 +1310,12 @@ static void _webrtc_set_remote_description(connection_s *conn) static void __foreach_ice_candidate(gpointer data, gpointer user_data) { + connection_s *conn = (connection_s*)user_data; int ret = WEBRTC_ERROR_NONE; - ret = webrtc_add_ice_candidate(g_conns[0].webrtc, (const char *)data); + RET_IF(!conn, "conn is NULL"); + + ret = webrtc_add_ice_candidate(conn->webrtc, (const char *)data); RET_IF(ret != WEBRTC_ERROR_NONE, "ret[0x%x]", ret); g_print("webrtc_ice_candidate() success\n"); @@ -1330,7 +1333,7 @@ static void _webrtc_add_ice_candidate(connection_s *conn, const gchar *candidate return; } - g_list_foreach(conn->ice_candidates, __foreach_ice_candidate, NULL); + g_list_foreach(conn->ice_candidates, __foreach_ice_candidate, conn); } static void _webrtc_set_stun_server(int index, char *uri)