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;