summaryrefslogtreecommitdiff
path: root/modules/zrtp
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2014-09-06 01:07:50 +0200
committerAlfred E. Heggestad <aeh@db.org>2014-09-06 01:07:50 +0200
commit70ba83b68294c33cca5b8d2910829d561feb5d01 (patch)
treef42e9e44c60297e61dd4f1fb408b269557710683 /modules/zrtp
parent73b9af980d1275b945ac082192349f8b87983130 (diff)
zrtp: send control packets from this UDP-helper
- udp_send() will process *all* send helpers on that UDP-socket, from the top-level helper to the bottom-level helper (including the helper used by zrtp). - instead we use udp_send_helper() which will send the outgoing packet from the helper right *below* this helper (st->uh), and continue down the chain of helpers. - the logic behind UDP-helpers is that a particular helper should not know about any other potential helpers above or below
Diffstat (limited to 'modules/zrtp')
-rw-r--r--modules/zrtp/zrtp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/zrtp/zrtp.c b/modules/zrtp/zrtp.c
index f77335a..b4f9d8d 100644
--- a/modules/zrtp/zrtp.c
+++ b/modules/zrtp/zrtp.c
@@ -214,9 +214,9 @@ static int media_alloc(struct menc_media **stp, struct menc_sess *sess,
}
-static int zrtp_send_rtp_callback(const zrtp_stream_t *stream,
- char *rtp_packet,
- unsigned int rtp_packet_length)
+static int on_send_packet(const zrtp_stream_t *stream,
+ char *rtp_packet,
+ unsigned int rtp_packet_length)
{
struct menc_media *st = zrtp_stream_get_userdata(stream);
struct mbuf *mb;
@@ -232,7 +232,7 @@ static int zrtp_send_rtp_callback(const zrtp_stream_t *stream,
(void)mbuf_write_mem(mb, (void *)rtp_packet, rtp_packet_length);
mb->pos = 0;
- err = udp_send(st->rtpsock, &st->raddr, mb);
+ err = udp_send_helper(st->rtpsock, &st->raddr, mb, st->uh);
if (err) {
warning("zrtp: udp_send %u bytes (%m)\n",
rtp_packet_length, err);
@@ -301,7 +301,7 @@ static int module_init(void)
sizeof(zrtp_config.client_id));
zrtp_config.lic_mode = ZRTP_LICENSE_MODE_UNLIMITED;
- zrtp_config.cb.misc_cb.on_send_packet = zrtp_send_rtp_callback;
+ zrtp_config.cb.misc_cb.on_send_packet = on_send_packet;
s = zrtp_init(&zrtp_config, &zrtp_global);
if (zrtp_status_ok != s) {