From 8d6f59d74f8eec14ffdf2e08dd2cf6e1c064b7f1 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 25 Feb 2021 21:20:36 +0000 Subject: [PATCH] minimal-ss-client-tx: add -c flag for count of rx to get --- .../minimal-secure-streams-client-tx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/minimal-examples/secure-streams/minimal-secure-streams-client-tx/minimal-secure-streams-client-tx.c b/minimal-examples/secure-streams/minimal-secure-streams-client-tx/minimal-secure-streams-client-tx.c index 583b8d637..0899010c5 100644 --- a/minimal-examples/secure-streams/minimal-secure-streams-client-tx/minimal-secure-streams-client-tx.c +++ b/minimal-examples/secure-streams/minimal-secure-streams-client-tx/minimal-secure-streams-client-tx.c @@ -23,7 +23,7 @@ #define PKT_SIZE 80 #define RATE_US 50000 -static int interrupted, bad = 1; +static int interrupted, bad = 1, reads = 100; typedef struct myss { struct lws_ss_handle *ss; @@ -54,7 +54,7 @@ txcb(struct lws_sorted_usec_list *sul) * this as a pass / fail test. */ - if (m->count == 100) { + if (m->count == reads) { interrupted = 1; bad = 0; } else { @@ -150,6 +150,9 @@ int main(int argc, const char **argv) if ((p = lws_cmdline_option(argc, argv, "-d"))) logs = atoi(p); + if ((p = lws_cmdline_option(argc, argv, "-c"))) + reads = atoi(p); + lws_set_log_level(logs, NULL); lwsl_user("LWS secure streams client TX [-d]\n");