aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2013-02-12 17:23:29 +0100
committerPablo Neira Ayuso <pablo@gnumonks.org>2013-02-12 17:24:13 +0100
commitc92810eccd491b9dfc7b1c2bb4dbc599ff04e9fe (patch)
tree7e4493bbd64cb3e551acd014f0904a1b6a0f3b4d /src
parent7ff7a5cd6da3ce40b4cb9daea90948a1ec1495e1 (diff)
osmux: remove arrays from osmux_out_handle
there will be one osmux_out_handle per endpoint.
Diffstat (limited to 'src')
-rw-r--r--src/osmux.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/osmux.c b/src/osmux.c
index d1295d1..2775bfa 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -73,8 +73,8 @@ osmux_rebuild_rtp(struct osmux_out_handle *h,
rtph->version = RTP_VERSION;
rtph->payload_type = 98;
/* ... emulate timestamp and ssrc */
- rtph->timestamp = htonl(h->rtp_timestamp[osmuxh->circuit_id]);
- rtph->sequence = htons(h->rtp_seq[osmuxh->circuit_id]);
+ rtph->timestamp = htonl(h->rtp_timestamp);
+ rtph->sequence = htons(h->rtp_seq);
rtph->ssrc = htonl(ssrc_from_ccid);
msgb_put(out_msg, sizeof(struct rtp_hdr));
@@ -93,8 +93,8 @@ osmux_rebuild_rtp(struct osmux_out_handle *h,
msgb_put(out_msg, payload_len);
/* bump last RTP sequence number and timestamp that has been used */
- h->rtp_seq[osmuxh->circuit_id]++;
- h->rtp_timestamp[osmuxh->circuit_id] += DELTA_RTP_TIMESTAMP;
+ h->rtp_seq++;
+ h->rtp_timestamp += DELTA_RTP_TIMESTAMP;
osmo_rtp_snprintf(buf, sizeof(buf), out_msg);
LOGP(DLMIB, LOGL_DEBUG, "%s\n", buf);
@@ -499,10 +499,6 @@ osmux_tx_sched(struct llist_head *list,
void osmux_xfrm_output_init(struct osmux_out_handle *h)
{
- int i;
-
- for (i=0; i<OSMUX_MAX_CONCURRENT_CALLS; i++) {
- h->rtp_seq[i] = (uint16_t)random();
- h->rtp_timestamp[i] = (uint32_t)random();
- }
+ h->rtp_seq = (uint16_t)random();
+ h->rtp_timestamp = (uint32_t)random();
}