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
diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c
index a36c6d2..98b3099 100644
--- a/src/libosmo-mgcp/mgcp_sdp.c
+++ b/src/libosmo-mgcp/mgcp_sdp.c
@@ -98,7 +98,7 @@
/* 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 @@
/* 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 @@
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 @@
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 @@
/* 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;
}