webrtc_test: Fix to add ice candidate to the valid handle 41/265741/2 accepted/tizen/unified/20211029.132537 submit/tizen/20211028.055213
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 28 Oct 2021 03:27:15 +0000 (12:27 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 28 Oct 2021 03:33:06 +0000 (12:33 +0900)
[Version] 0.2.143
[Issue Type] Bug fix

Change-Id: Ic3c8a754382b222d74143fd8062146449d20d842
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
test/webrtc_test.c

index 7c5552f1f9d304bb1875008eda5cc06714126cce..6a94242a619e66b2233e4042694b9e65c872e1ac 100644 (file)
@@ -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
index fa6ce6418283f292d090657aa2fcdaab9d92c627..1f203ccd924e28bd29a8b04c4154460fea4fd506 100644 (file)
@@ -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)