Skip to content
Success

Changes

Summary

  1. mgw: Introduce struct mgcp_codecset struct (details)
Commit b6e4b0eb7eaf2360de20966ee0757a81068a91c4 by Pau Espin Pedrol
mgw: Introduce struct mgcp_codecset struct

We do tons of operations on 3 fields (array of codecs, len of array,
selected code) which can be isolated.
Right now, we are using APIs which somehow require structs 2-3 levels of
encapsulation above the ones really required, which makes all code
totally entangled, difficult to understand and prone to errors when
changing stuff in deeply nested structs.
A prove of this is how this patch affects a lot of lines in lots of
places.

Change-Id: Id7db7ab01d56b7fa2415123b604375e48c82ab25
The file was modifiedsrc/libosmo-mgcp/mgcp_conn.c
The file was modifiedsrc/libosmo-mgcp/mgcp_codec.c
The file was modifiedsrc/libosmo-mgcp/mgcp_protocol.c
The file was modifiedsrc/libosmo-mgcp/mgcp_vty.c
The file was modifiedinclude/osmocom/mgcp/mgcp_codec.h
The file was modifiedinclude/osmocom/mgcp/mgcp_rtp_end.h
The file was modifiedsrc/libosmo-mgcp/mgcp_iuup.c
The file was modifiedtests/mgcp/mgcp_test.c
The file was modifiedsrc/libosmo-mgcp/mgcp_network.c
The file was modifiedsrc/libosmo-mgcp/mgcp_e1.c
The file was modifiedsrc/libosmo-mgcp/mgcp_sdp.c
The file was modifiedsrc/libosmo-mgcp/mgcp_osmux.c