Browse Source

MT#55283 add dedicated "unknown" transport protocol

Instead of just leaving the transport protocol unset when we know we're
not supposed to be aware of the protocol, add a special entry to
suppress the pointless warning message.

Change-Id: I228c2f1652320627f974d9d7bcb0b1345adce2be
(cherry picked from commit 7ed04c3949)
mr10.5.3
Richard Fuchs 3 years ago
parent
commit
99fc188a53
2 changed files with 12 additions and 0 deletions
  1. +11
    -0
      daemon/media_socket.c
  2. +1
    -0
      include/media_socket.h

+ 11
- 0
daemon/media_socket.c View File

@ -189,6 +189,14 @@ const struct transport_protocol transport_protocols[] = {
.avpf = 1,
.tcp = 0,
},
[PROTO_UNKNOWN] = {
.index = PROTO_UNKNOWN,
.name = "unknown (legacy)",
.rtp = 0,
.srtp = 0,
.avpf = 0,
.tcp = 0,
},
};
const int num_transport_protocols = G_N_ELEMENTS(transport_protocols);
@ -351,6 +359,7 @@ static const struct streamhandler * const __sh_matrix_noop[__PROTO_LAST] = { //
[PROTO_UDPTL] = &__sh_noop,
[PROTO_RTP_SAVP_OSRTP] = &__sh_noop,
[PROTO_RTP_SAVPF_OSRTP] = &__sh_noop,
[PROTO_UNKNOWN] = &__sh_noop,
};
/* ********** */
@ -365,6 +374,7 @@ static const struct streamhandler * const * const __sh_matrix[__PROTO_LAST] = {
[PROTO_UDPTL] = __sh_matrix_noop,
[PROTO_RTP_SAVP_OSRTP] = __sh_matrix_in_rtp_savp,
[PROTO_RTP_SAVPF_OSRTP] = __sh_matrix_in_rtp_savpf,
[PROTO_UNKNOWN] = __sh_matrix_noop,
};
/* special case for DTLS as we can't pass through SRTP<>SRTP */
static const struct streamhandler * const * const __sh_matrix_recrypt[__PROTO_LAST] = {
@ -377,6 +387,7 @@ static const struct streamhandler * const * const __sh_matrix_recrypt[__PROTO_LA
[PROTO_UDPTL] = __sh_matrix_noop,
[PROTO_RTP_SAVP_OSRTP] = __sh_matrix_in_rtp_savp_recrypt,
[PROTO_RTP_SAVPF_OSRTP] = __sh_matrix_in_rtp_savpf_recrypt,
[PROTO_UNKNOWN] = __sh_matrix_noop,
};
/* ********** */


+ 1
- 0
include/media_socket.h View File

@ -39,6 +39,7 @@ enum transport_protocol_index {
PROTO_UDPTL,
PROTO_RTP_SAVP_OSRTP,
PROTO_RTP_SAVPF_OSRTP,
PROTO_UNKNOWN,
__PROTO_LAST,
};


Loading…
Cancel
Save