From 19cc31cd4ad6bf38feea53d7c0302005fb9526d1 Mon Sep 17 00:00:00 2001 From: Heikki Tampio Date: Mon, 31 Jul 2023 13:23:01 +0300 Subject: [PATCH] zrtp: Remove old deprecated functions, clean up code --- src/zrtp/commit.cc | 9 +-------- src/zrtp/commit.hh | 4 +--- src/zrtp/confirm.cc | 7 ------- src/zrtp/confirm.hh | 2 -- src/zrtp/dh_kxchng.cc | 9 +-------- src/zrtp/dh_kxchng.hh | 2 -- src/zrtp/hello.cc | 7 ------- src/zrtp/hello.hh | 1 - src/zrtp/hello_ack.cc | 11 ----------- src/zrtp/hello_ack.hh | 3 --- src/zrtp/zrtp_message.hh | 3 --- 11 files changed, 3 insertions(+), 55 deletions(-) diff --git a/src/zrtp/commit.cc b/src/zrtp/commit.cc index e9edc9c..1720076 100644 --- a/src/zrtp/commit.cc +++ b/src/zrtp/commit.cc @@ -96,11 +96,4 @@ rtp_error_t uvgrtp::zrtp_msg::commit::parse_msg(uvgrtp::zrtp_msg::zrtp_commit* c memcpy(session.r_msg.commit.second, msg, len); return RTP_OK; -} - -rtp_error_t uvgrtp::zrtp_msg::commit::parse_msg(uvgrtp::zrtp_msg::receiver& receiver, zrtp_session_t& session) -{ - (void)receiver; - (void)session; - return RTP_OK; -} +} \ No newline at end of file diff --git a/src/zrtp/commit.hh b/src/zrtp/commit.hh index 746780a..5fffbfa 100644 --- a/src/zrtp/commit.hh +++ b/src/zrtp/commit.hh @@ -47,9 +47,7 @@ namespace uvgrtp { commit(zrtp_session_t& session); ~commit(); - /* TODO: */ - virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::zrtp_commit* commit, zrtp_session_t& session, size_t len); - virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::receiver& receiver, zrtp_session_t& session); + rtp_error_t parse_msg(uvgrtp::zrtp_msg::zrtp_commit* commit, zrtp_session_t& session, size_t len); }; } } diff --git a/src/zrtp/confirm.cc b/src/zrtp/confirm.cc index 6d4c002..ecd7cc6 100644 --- a/src/zrtp/confirm.cc +++ b/src/zrtp/confirm.cc @@ -72,13 +72,6 @@ uvgrtp::zrtp_msg::confirm::confirm(zrtp_session_t& session, int part): uvgrtp::zrtp_msg::confirm::~confirm() {} -rtp_error_t uvgrtp::zrtp_msg::confirm::parse_msg(uvgrtp::zrtp_msg::receiver& receiver, zrtp_session_t& session) -{ - (void)receiver; - (void)session; - return RTP_OK; -} - rtp_error_t uvgrtp::zrtp_msg::confirm::parse_msg(uvgrtp::zrtp_msg::zrtp_confirm* confirm, zrtp_session_t& session) { allocate_rframe(sizeof(zrtp_confirm)); diff --git a/src/zrtp/confirm.hh b/src/zrtp/confirm.hh index 3f00c5a..0c0f02f 100644 --- a/src/zrtp/confirm.hh +++ b/src/zrtp/confirm.hh @@ -52,8 +52,6 @@ namespace uvgrtp { confirm(zrtp_session_t& session, int part); ~confirm(); - /* TODO: */ - virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::receiver& receiver, zrtp_session_t& session); virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::zrtp_confirm* confirm, zrtp_session_t& session); }; } diff --git a/src/zrtp/dh_kxchng.cc b/src/zrtp/dh_kxchng.cc index 0b153e4..3e0d784 100644 --- a/src/zrtp/dh_kxchng.cc +++ b/src/zrtp/dh_kxchng.cc @@ -127,11 +127,4 @@ rtp_error_t uvgrtp::zrtp_msg::dh_key_exchange::parse_msg(uvgrtp::zrtp_msg::zrtp_ memcpy(session.r_msg.dh.second, msg, len); return RTP_OK; -} - -rtp_error_t uvgrtp::zrtp_msg::dh_key_exchange::parse_msg(uvgrtp::zrtp_msg::receiver& receiver, zrtp_session_t& session) -{ - (void)receiver; - (void)session; - return RTP_OK; -} +} \ No newline at end of file diff --git a/src/zrtp/dh_kxchng.hh b/src/zrtp/dh_kxchng.hh index ef476bb..42d67a2 100644 --- a/src/zrtp/dh_kxchng.hh +++ b/src/zrtp/dh_kxchng.hh @@ -41,8 +41,6 @@ namespace uvgrtp { dh_key_exchange(struct zrtp_dh *dh); ~dh_key_exchange(); - /* TODO: */ - virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::receiver& receiver, zrtp_session_t& session); virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::zrtp_dh* dh, zrtp_session_t& session, size_t len); }; diff --git a/src/zrtp/hello.cc b/src/zrtp/hello.cc index b9ef282..a4bf40a 100644 --- a/src/zrtp/hello.cc +++ b/src/zrtp/hello.cc @@ -114,10 +114,3 @@ rtp_error_t uvgrtp::zrtp_msg::hello::parse_msg(uvgrtp::zrtp_msg::zrtp_hello* hel return RTP_OK; } - -rtp_error_t uvgrtp::zrtp_msg::hello::parse_msg(uvgrtp::zrtp_msg::receiver& receiver, zrtp_session_t& session) -{ - (void)receiver; - (void)session; - return RTP_OK; -} diff --git a/src/zrtp/hello.hh b/src/zrtp/hello.hh index a7d1228..7fe30b4 100644 --- a/src/zrtp/hello.hh +++ b/src/zrtp/hello.hh @@ -62,7 +62,6 @@ namespace uvgrtp { ~hello(); /* TODO: */ - virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::receiver& receiver, zrtp_session_t& session); virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::zrtp_hello* hello, zrtp_session_t& session, size_t len); }; } diff --git a/src/zrtp/hello_ack.cc b/src/zrtp/hello_ack.cc index 4a71d83..273c8cd 100644 --- a/src/zrtp/hello_ack.cc +++ b/src/zrtp/hello_ack.cc @@ -24,14 +24,3 @@ uvgrtp::zrtp_msg::hello_ack::hello_ack(zrtp_session_t& session) uvgrtp::zrtp_msg::hello_ack::~hello_ack() {} - -rtp_error_t uvgrtp::zrtp_msg::hello_ack::parse_msg(uvgrtp::zrtp_msg::receiver& receiver, - zrtp_session_t& session) -{ - (void)receiver; - (void)session; - - // TODO? - - return RTP_OK; -} diff --git a/src/zrtp/hello_ack.hh b/src/zrtp/hello_ack.hh index c134b42..1b885b3 100644 --- a/src/zrtp/hello_ack.hh +++ b/src/zrtp/hello_ack.hh @@ -30,9 +30,6 @@ namespace uvgrtp { public: hello_ack(zrtp_session_t& session); ~hello_ack(); - - virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::receiver& receiver, - zrtp_session_t& session); }; } diff --git a/src/zrtp/zrtp_message.hh b/src/zrtp/zrtp_message.hh index 78ee7ca..5615bbf 100644 --- a/src/zrtp/zrtp_message.hh +++ b/src/zrtp/zrtp_message.hh @@ -27,9 +27,6 @@ namespace uvgrtp { rtp_error_t send_msg(std::shared_ptr socket, sockaddr_in& addr, sockaddr_in6& addr6); - virtual rtp_error_t parse_msg(uvgrtp::zrtp_msg::receiver& receiver, - zrtp_session_t& session) = 0; - static ssize_t header_length_to_packet(uint16_t header_len); static uint16_t packet_to_header_len(ssize_t packet);