From 757956565e30efd8b29c2ccc80862af4f3331c96 Mon Sep 17 00:00:00 2001 From: mom040267 Date: Wed, 25 Feb 2015 08:21:40 +0000 Subject: [PATCH] working on bw fixes --- src/apps/relay/ns_ioalib_engine_impl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/apps/relay/ns_ioalib_engine_impl.c b/src/apps/relay/ns_ioalib_engine_impl.c index 87c2eae..ce51d27 100644 --- a/src/apps/relay/ns_ioalib_engine_impl.c +++ b/src/apps/relay/ns_ioalib_engine_impl.c @@ -327,7 +327,6 @@ static void free_blist_elem(ioa_engine_handle e, stun_buffer_list_elem *buf_elem /************** ENGINE *************************/ #define TURN_JIFFIE_SIZE (3) -#define TURN_JIFFIE_LENGTH (1<<(TURN_JIFFIE_SIZE)) static void timer_handler(ioa_engine_handle e, void* arg) { @@ -642,9 +641,7 @@ void delete_ioa_timer(ioa_timer_handle th) static int ioa_socket_check_bandwidth(ioa_socket_handle s, size_t sz, int read) { - if(read && s && (s->e) && sz && - ((s->sat == CLIENT_SOCKET) || (s->sat == RELAY_SOCKET) || (s->sat == RELAY_RTCP_SOCKET)) && - (s->session)) { + if(s && (s->e) && sz && (s->sat == CLIENT_SOCKET) && (s->session)) { band_limit_t max_bps = s->session->bps; @@ -670,9 +667,11 @@ static int ioa_socket_check_bandwidth(ioa_socket_handle s, size_t sz, int read) s->jiffie_bytes_read = bsz; else s->jiffie_bytes_write = bsz; + return 1; } } else { + band_limit_t nsz; if(read) nsz = s->jiffie_bytes_read + bsz;