From 8029b12146c83a85c49455b7ad8d93cecb7bcf8d Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 23 Dec 2021 16:22:30 +0100 Subject: [PATCH] cosmetic: Rename variable payload=>payload_type Using "payload" there is misleading, the proper naming is payload type, a well known term for RTP. Change-Id: Ifcad63b0ba5068acd555960c71c3ad1489a2b870 --- src/libosmo-mgcp/mgcp_sdp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index a36c6d2d5..98b309929 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -98,7 +98,7 @@ static void codecs_initialize(void *ctx, struct sdp_rtp_map *codecs, int used) /* Helper function to update codec map information with additional data from * SDP, called from: mgcp_parse_sdp_data() */ static void codecs_update(void *ctx, struct sdp_rtp_map *codecs, int used, - int payload, const char *audio_name) + int payload_type, const char *audio_name) { int i; @@ -110,7 +110,7 @@ static void codecs_update(void *ctx, struct sdp_rtp_map *codecs, int used, /* Note: We can only update payload codecs that already exist * in our codec list. If we get an unexpected payload type, * we just drop it */ - if (codecs[i].payload_type != payload) + if (codecs[i].payload_type != payload_type) continue; if (sscanf(audio_name, "%63[^/]/%d/%d", @@ -127,7 +127,7 @@ static void codecs_update(void *ctx, struct sdp_rtp_map *codecs, int used, return; } - LOGP(DLMGCP, LOGL_ERROR, "Unconfigured PT(%d) with %s\n", payload, + LOGP(DLMGCP, LOGL_ERROR, "Unconfigured PT(%d) with %s\n", payload_type, audio_name); } @@ -334,7 +334,7 @@ int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp, void *tmp_ctx = talloc_new(NULL); struct mgcp_rtp_end *rtp; - int payload; + int payload_type; int ptime, ptime2 = 0; char audio_name[64]; int port, rc; @@ -355,8 +355,8 @@ int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp, /* skip these SDP attributes */ break; case 'a': - if (sscanf(line, "a=rtpmap:%d %63s", &payload, audio_name) == 2) { - codecs_update(tmp_ctx, codecs, codecs_used, payload, audio_name); + if (sscanf(line, "a=rtpmap:%d %63s", &payload_type, audio_name) == 2) { + codecs_update(tmp_ctx, codecs, codecs_used, payload_type, audio_name); break; }