From fea51c62b54b1348eb6063f7a3fa5dbbeeafd571 Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Wed, 11 Sep 2024 22:45:31 -0400 Subject: [PATCH] Don't zero out Agent on Gather This removes remote trickled candidates --- src/agent.c | 1 - src/peer_connection.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/agent.c b/src/agent.c index ae4d5e9..a732f04 100644 --- a/src/agent.c +++ b/src/agent.c @@ -234,7 +234,6 @@ void agent_gather_candidate(Agent* agent, const char* urls, const char* username int addr_type[1] = {AF_INET}; // ipv6 no need stun Address resolved_addr; memset(hostname, 0, sizeof(hostname)); - memset(agent, 0, sizeof(Agent)); agent_create_sockets(agent); agent_create_host_addr(agent); diff --git a/src/peer_connection.c b/src/peer_connection.c index 18272d0..33d98a0 100644 --- a/src/peer_connection.c +++ b/src/peer_connection.c @@ -259,8 +259,6 @@ static void peer_connection_state_new(PeerConnection* pc, DtlsSrtpRole role) { memset(pc->temp_buf, 0, sizeof(pc->temp_buf)); - agent_deinit(&pc->agent); - dtls_srtp_reset_session(&pc->dtls_srtp); dtls_srtp_init(&pc->dtls_srtp, role, pc); pc->dtls_srtp.udp_recv = peer_connection_dtls_srtp_recv;