Skip to content

Commit

Permalink
Let send_pkt() do a sender selection for us.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Jul 5, 2024
1 parent a38517f commit 7a4c06a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion modules/dtls_gw/rtpp_dtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ struct rtpp_refcnt;
struct rtpp_dtls_conn;
struct rtpp_dtls;
struct rtpp_stream;
struct rtpp_anetio_cf;
struct rdc_fp_spec;

DEFINE_METHOD(rtpp_dtls, rtpp_dtls_newconn, struct rtpp_dtls_conn *,
Expand Down
5 changes: 1 addition & 4 deletions modules/dtls_gw/rtpp_dtls_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ const struct srtp_crypto_suite srtp_suites [] = {
struct rtpp_dtls_conn_priv {
struct rtpp_dtls_conn pub;
struct rtpp_stream *dtls_strmp;
struct rtpp_anetio_cf *netio_cf;
struct rtpp_timed *timed_cf;
pthread_mutex_t state_lock;
enum rdc_state state;
Expand Down Expand Up @@ -225,7 +224,6 @@ rtpp_dtls_conn_ctor(const struct rtpp_cfg *cfsp, SSL_CTX *ctx,
/* Cannot grab refcount here, circular reference would ensue */
/* RTPP_OBJ_INCREF(dtls_strmp); */
pvt->dtls_strmp = dtls_strmp;
pvt->netio_cf = cfsp->rtpp_proc_cf->netio;
pvt->timed_cf = cfsp->rtpp_timed_cf;
pvt->pub.dtls_recv = rtpp_dtls_conn_dtls_recv;
pvt->pub.rtp_send = rtpp_dtls_conn_rtp_send;
Expand Down Expand Up @@ -525,8 +523,7 @@ bio_write(BIO *b, const char *buf, int len)
return (-1);
memcpy(packet->data.buf, buf, len);
packet->size = len;
sender = rtpp_anetio_pick_sender(pvt->netio_cf);
CALL_SMETHOD(pvt->dtls_strmp, send_pkt, sender, packet);
CALL_SMETHOD(pvt->dtls_strmp, send_pkt, NULL, packet);
return (len);
}

Expand Down
1 change: 0 additions & 1 deletion modules/dtls_gw/rtpp_dtls_conn.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ struct rtpp_refcnt;
struct rtpp_stream;
struct rtpp_dtls_conn;
struct rtp_packet;
struct rtpp_anetio_cf;
struct pkt_proc_ctx;

enum rtpp_dtls_mode {
Expand Down

0 comments on commit 7a4c06a

Please sign in to comment.