From 7872027a02845b249dd7c6c9b8ac83fcc3087afa Mon Sep 17 00:00:00 2001 From: Ivan Simonini Date: Fri, 19 Apr 2019 11:59:04 +0200 Subject: [PATCH] Repeated attempts at input stream request Instead of giving up immediately when an input stream request fails, we now attempt a number of times after a brief pause. Both parameters are hard-coded for simplicity. Debug messages track the number of attempts. --- Linux/Makefile | 1 + Linux/env64.env | 8 ++++++++ Linux/src/exampleClientBidir.c | 19 +++++++++++++++---- 3 files changed, 24 insertions(+), 4 deletions(-) create mode 120000 Linux/Makefile create mode 100644 Linux/env64.env diff --git a/Linux/Makefile b/Linux/Makefile new file mode 120000 index 0000000..51b3b8d --- /dev/null +++ b/Linux/Makefile @@ -0,0 +1 @@ +makefile.linux \ No newline at end of file diff --git a/Linux/env64.env b/Linux/env64.env new file mode 100644 index 0000000..b5b6a40 --- /dev/null +++ b/Linux/env64.env @@ -0,0 +1,8 @@ + +EBDIR=$( readlink -f -- $(dirname $BASH_SOURCE) )/ + +# export CPATH=$CPATH:/usr/include/libxml2/ +export TARGET_PLATFORM=x86_64 +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${EBDIR}lib64/ +export EBCLIENT=${EBDIR}ebclient + diff --git a/Linux/src/exampleClientBidir.c b/Linux/src/exampleClientBidir.c index d5bc2cd..448bed5 100644 --- a/Linux/src/exampleClientBidir.c +++ b/Linux/src/exampleClientBidir.c @@ -425,6 +425,8 @@ int main (int argc, char * argv[]) { S2S_Time startT; S2S_Time stopT; + int inputRequestAttempts = 2; // Attempt input stream request to Mediator up to N times + int inputRequestAttemptTimeoutMS = 2000; // Wait N milliseconds in between attempts static struct option lopt[] = { {"serverHost", 1, NULL, 's'}, @@ -662,11 +664,20 @@ int main (int argc, char * argv[]) { if ( !inputType ) inputType = strdup ("speech"); for (i=0; i