openbsd-ports/telephony/pjsua/patches/patch-pjlib_src_pjlib-test_activesock_c
dcoppa 42a5d6cf0f Update to pjsua-1.5.5
From (new) MAINTAINER Christopher Zimmermann with some modifications
by landry@, ajacoutot@, sthen@ and myself.

Thanks!

OK landry@, ajacoutot@, sthen@
2010-04-02 11:48:24 +00:00

33 lines
859 B
Plaintext

$OpenBSD: patch-pjlib_src_pjlib-test_activesock_c,v 1.1 2010/04/02 11:48:24 dcoppa Exp $
fix from upstream:
reduce the loop in PJLIB activesock test
--- pjlib/src/pjlib-test/activesock.c.orig Fri Jan 8 10:53:31 2010
+++ pjlib/src/pjlib-test/activesock.c Wed Mar 31 10:28:45 2010
@@ -337,7 +337,7 @@ static pj_bool_t tcp_on_data_sent(pj_activesock_t *aso
static int tcp_perf_test(void)
{
- enum { COUNT=100000 };
+ enum { COUNT=10000 };
pj_pool_t *pool = NULL;
pj_ioqueue_t *ioqueue = NULL;
pj_sock_t sock1=PJ_INVALID_SOCKET, sock2=PJ_INVALID_SOCKET;
@@ -436,6 +436,15 @@ static int tcp_perf_test(void)
}
}
}
+
+#ifndef PJ_SYMBIAN
+ for (;;) {
+ pj_time_val timeout = {0, 10};
+ if (pj_ioqueue_poll(ioqueue, &timeout) < 1)
+ break;
+ }
+#endif
+
}
/* Wait until everything has been sent/received */