aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-09-01 10:35:55 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-09-02 08:25:49 +0200
commitcac2438b0c33f54a6dcac55b55e8cfc33de197b2 (patch)
treebf8b01402f20bfb5d49a4cf6204197061dcb0924 /openbsc/src/libmgcp/mgcp_vty.c
parent3713f78ac23ca815c361fe79378ff6d2e522ef6a (diff)
mgcp: Move the "codec" params to a struct
We might be offered multiple codecs by the remote and need to switch between them once we receive data. Do this by moving it to a struct so we can separate between proposed and current codec. In SDP we can have multiple codecs but a global ptime. The current code doesn't separate that clearly instead we write it to the main codec.
Diffstat (limited to 'openbsc/src/libmgcp/mgcp_vty.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_vty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c
index 9ae0bc9fa..b29eb6b4d 100644
--- a/openbsc/src/libmgcp/mgcp_vty.c
+++ b/openbsc/src/libmgcp/mgcp_vty.c
@@ -147,6 +147,8 @@ static int config_write_mgcp(struct vty *vty)
static void dump_rtp_end(const char *end_name, struct vty *vty,
struct mgcp_rtp_state *state, struct mgcp_rtp_end *end)
{
+ struct mgcp_rtp_codec *codec = &end->codec;
+
vty_out(vty,
" %s%s"
" Timestamp Errs: %d->%d%s"
@@ -160,10 +162,10 @@ static void dump_rtp_end(const char *end_name, struct vty *vty,
state->in_stream.err_ts_counter,
state->out_stream.err_ts_counter, VTY_NEWLINE,
end->dropped_packets, VTY_NEWLINE,
- end->payload_type, end->rate, end->channels, VTY_NEWLINE,
- end->frame_duration_num, end->frame_duration_den, VTY_NEWLINE,
+ codec->payload_type, codec->rate, codec->channels, VTY_NEWLINE,
+ codec->frame_duration_num, codec->frame_duration_den, VTY_NEWLINE,
end->frames_per_packet, end->packet_duration_ms, VTY_NEWLINE,
- end->fmtp_extra, end->audio_name, end->subtype_name, VTY_NEWLINE,
+ end->fmtp_extra, codec->audio_name, codec->subtype_name, VTY_NEWLINE,
end->output_enabled, end->force_output_ptime, VTY_NEWLINE);
}