aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-04-25 17:27:13 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-04-27 08:50:01 +0000
commita15d00ca578a57a73e7612aaa9bdc02505b6cd12 (patch)
treeaeaa6905d660ae98fc8092386b37388bff774276
parentdafdb5ef8ce551ab212a81aac0be009dba9cca02 (diff)
osmux: use uint8_t everywhere for batch_factor
-rw-r--r--src/osmux.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osmux.c b/src/osmux.c
index 5655269..ae0bf26 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -53,7 +53,7 @@ static uint32_t osmux_get_payload_len(struct osmux_hdr *osmuxh)
return osmo_amr_bytes(osmuxh->amr_ft) * (osmuxh->ctr+1);
}
-static uint32_t osmux_ft_dummy_size(uint8_t amr_ft, uint32_t batch_factor)
+static uint32_t osmux_ft_dummy_size(uint8_t amr_ft, uint8_t batch_factor)
{
return sizeof(struct osmux_hdr) + (osmo_amr_bytes(amr_ft) * batch_factor);
}
@@ -307,7 +307,7 @@ static int osmux_xfrm_encode_amr(struct osmux_batch *batch,
return 0;
}
-static void osmux_encode_dummy(struct osmux_batch *batch, uint32_t batch_factor,
+static void osmux_encode_dummy(struct osmux_batch *batch, uint8_t batch_factor,
struct osmux_input_state *state)
{
struct osmux_hdr *osmuxh;
@@ -331,7 +331,7 @@ static void osmux_encode_dummy(struct osmux_batch *batch, uint32_t batch_factor,
}
static struct msgb *osmux_build_batch(struct osmux_batch *batch,
- uint32_t batch_size, uint32_t batch_factor)
+ uint32_t batch_size, uint8_t batch_factor)
{
struct msgb *batch_msg;
struct osmux_circuit *circuit;
@@ -523,7 +523,7 @@ osmux_batch_find_circuit(struct osmux_batch *batch, int ccid)
static struct osmux_circuit *
osmux_batch_add_circuit(struct osmux_batch *batch, int ccid, int dummy,
- int batch_factor)
+ uint8_t batch_factor)
{
struct osmux_circuit *circuit;
@@ -563,7 +563,7 @@ static void osmux_batch_del_circuit(struct osmux_batch *batch, struct osmux_circ
}
static int
-osmux_batch_add(struct osmux_batch *batch, int batch_factor, struct msgb *msg,
+osmux_batch_add(struct osmux_batch *batch, uint32_t batch_factor, struct msgb *msg,
struct rtp_hdr *rtph, int ccid)
{
int bytes = 0, amr_payload_len;