Define mgcp_rtp_end.output_enabled as bool
Change-Id: I55f7796ef774f86050041f2c5e3a2f8f7d1f56df
This commit is contained in:
parent
8029b12146
commit
cac10c94c3
|
@ -110,8 +110,8 @@ struct mgcp_rtp_end {
|
||||||
uint32_t packet_duration_ms;
|
uint32_t packet_duration_ms;
|
||||||
int maximum_packet_time; /* -1: not set */
|
int maximum_packet_time; /* -1: not set */
|
||||||
char *fmtp_extra;
|
char *fmtp_extra;
|
||||||
/* are we transmitting packets (1) or dropping (0) outbound packets */
|
/* are we transmitting packets (true) or dropping (false) outbound packets */
|
||||||
int output_enabled;
|
bool output_enabled;
|
||||||
/* FIXME: This parameter can be set + printed, but is nowhere used! */
|
/* FIXME: This parameter can be set + printed, but is nowhere used! */
|
||||||
int force_output_ptime;
|
int force_output_ptime;
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ static int mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct mgcp_conn *
|
||||||
/* Set default values */
|
/* Set default values */
|
||||||
end->frames_per_packet = 0; /* unknown */
|
end->frames_per_packet = 0; /* unknown */
|
||||||
end->packet_duration_ms = DEFAULT_RTP_AUDIO_PACKET_DURATION_MS;
|
end->packet_duration_ms = DEFAULT_RTP_AUDIO_PACKET_DURATION_MS;
|
||||||
end->output_enabled = 0;
|
end->output_enabled = false;
|
||||||
end->maximum_packet_time = -1;
|
end->maximum_packet_time = -1;
|
||||||
|
|
||||||
conn_rtp->rate_ctr_group = rate_ctr_group_alloc(conn, &rate_ctr_group_desc, rate_ctr_index++);
|
conn_rtp->rate_ctr_group = rate_ctr_group_alloc(conn, &rate_ctr_group_desc, rate_ctr_index++);
|
||||||
|
|
|
@ -110,8 +110,7 @@ int mgcp_parse_conn_mode(const char *mode, struct mgcp_endpoint *endp,
|
||||||
|
|
||||||
/* Special handling for RTP connections */
|
/* Special handling for RTP connections */
|
||||||
if (conn->type == MGCP_CONN_TYPE_RTP) {
|
if (conn->type == MGCP_CONN_TYPE_RTP) {
|
||||||
conn->u.rtp.end.output_enabled =
|
conn->u.rtp.end.output_enabled = !!(conn->mode & MGCP_CONN_SEND_ONLY);
|
||||||
conn->mode & MGCP_CONN_SEND_ONLY ? 1 : 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGPENDP(endp, DLMGCP, LOGL_DEBUG, "conn:%s\n", mgcp_conn_dump(conn));
|
LOGPENDP(endp, DLMGCP, LOGL_DEBUG, "conn:%s\n", mgcp_conn_dump(conn));
|
||||||
|
@ -121,7 +120,7 @@ int mgcp_parse_conn_mode(const char *mode, struct mgcp_endpoint *endp,
|
||||||
|
|
||||||
/* Special handling für RTP connections */
|
/* Special handling für RTP connections */
|
||||||
if (conn->type == MGCP_CONN_TYPE_RTP) {
|
if (conn->type == MGCP_CONN_TYPE_RTP) {
|
||||||
LOGPCONN(conn, DLMGCP, LOGL_DEBUG, "output_enabled %d\n",
|
LOGPCONN(conn, DLMGCP, LOGL_DEBUG, "output_enabled %u\n",
|
||||||
conn->u.rtp.end.output_enabled);
|
conn->u.rtp.end.output_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -868,7 +868,7 @@ static void test_messages(void)
|
||||||
printf("Connection mode not set\n");
|
printf("Connection mode not set\n");
|
||||||
|
|
||||||
OSMO_ASSERT(conn->end.output_enabled
|
OSMO_ASSERT(conn->end.output_enabled
|
||||||
== (conn->conn->mode & MGCP_CONN_SEND_ONLY ? 1 : 0));
|
== !!(conn->conn->mode & MGCP_CONN_SEND_ONLY));
|
||||||
|
|
||||||
conn->conn->mode |= CONN_UNMODIFIED;
|
conn->conn->mode |= CONN_UNMODIFIED;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue