On Tue, Mar 08, 2016 at 06:35:20PM +0100, Holger Hans Peter Freyther wrote:
> --- a/openbsc/src/libmgcp/mgcp_network.c
> +++ b/openbsc/src/libmgcp/mgcp_network.c
[...]
> @@ -688,7 +661,6 @@ static int rtp_data_net(struct osmo_fd *fd, unsigned int 
> what)
>  
>       switch(endp->type) {
>       case MGCP_RTP_DEFAULT:
> -     case MGCP_RTP_TRANSCODED:
>               if (endp->net_end.rtp_port != addr.sin_port &&
>                   endp->net_end.rtcp_port != addr.sin_port) {
>                       LOGP(DMGCP, LOGL_ERROR,
> @@ -719,9 +691,6 @@ static int rtp_data_net(struct osmo_fd *fd, unsigned int 
> what)
>       case MGCP_RTP_DEFAULT:
>               return mgcp_send(endp, MGCP_DEST_BTS, proto == MGCP_PROTO_RTP,
>                                &addr, buf, rc);
> -     case MGCP_RTP_TRANSCODED:
> -             return mgcp_send_transcoder(&endp->trans_net, endp->cfg,
> -                                         proto == MGCP_PROTO_RTP, buf, rc);
>       case MGCP_OSMUX_BSC_NAT:
>               return osmux_xfrm_to_osmux(MGCP_DEST_BTS, buf, rc, endp);
>       case MGCP_OSMUX_BSC:    /* Should not happen */
> @@ -811,9 +780,6 @@ static int rtp_data_bts(struct osmo_fd *fd, unsigned int 
> what)
>       case MGCP_RTP_DEFAULT:
>               return mgcp_send(endp, MGCP_DEST_NET, proto == MGCP_PROTO_RTP,
>                                &addr, buf, rc);
> -     case MGCP_RTP_TRANSCODED:
> -             return mgcp_send_transcoder(&endp->trans_bts, endp->cfg,
> -                                         proto == MGCP_PROTO_RTP, buf, rc);
>       case MGCP_OSMUX_BSC:
>               /* OSMUX translation: BTS -> BSC */
>               return osmux_xfrm_to_osmux(MGCP_DEST_NET, buf, rc, endp);

It could be a good idea to add 'default:' cases to above switch statements?
Now that we're removing some cases, would be good to catch callers still
passing one of the legacy cases (for whatever weird reasons)...

~Neels

Attachment: signature.asc
Description: Digital signature

Reply via email to