diff options
author | adv <adv@uma.es> | 2018-11-23 11:27:50 +0000 |
---|---|---|
committer | adv <adv@uma.es> | 2018-11-23 11:27:50 +0000 |
commit | fdebfdba10e5665ca001da97f81fbcbed843b4a9 (patch) | |
tree | a7af03d6aba02abba47b98f943b6f57a73ccf4b4 /client/engine | |
parent | 12ad7b2a6fcb895985826696a403f302819ef071 (diff) |
#851 corregida la comprobación del binario udp-receiver y de los
parametros disponibles. Asignar variables internas de la composición del
cliente mcast relacionadas con el parámetro en cuestión.
Diffstat (limited to 'client/engine')
-rwxr-xr-x | client/engine/Protocol.lib | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib index f3dbdc5b..2fb45fb4 100755 --- a/client/engine/Protocol.lib +++ b/client/engine/Protocol.lib @@ -339,14 +339,14 @@ fi #@date 2017/04/20 #@version 1.1.0.a - Parametros de clientes como sesision de multicast (ticket #851) #@author Antonio J. Doblas Viso -#@date 2018/09/11 +#@date 2018/09/22 #*/ ## # function ogMcastSyntax () { -local ISUDPCAST RECEIVERTIMEOUT PARM SESSION SESSIONPARM MODE PORTBASE PERROR +local ISUDPCAST RECEIVERTIMEOUT STARTTIMEOUT PARM SESSION SESSIONPARM MODE PORTBASE PERROR local METHOD ADDRESS BITRATE NCLIENTS MAXTIME CERROR local TOOL LEVEL DEVICE MBUFFER SYNTAXSERVER SYNTAXCLIENT @@ -368,7 +368,7 @@ PERROR=0 #si no tenemos updcast o su version superior 2009 udpcast error. ISUDPCAST=$(udp-receiver --help 2>&1) -echo $ISUDPCAST | grep start-timeout > /dev/null || ogRaiseError $OG_ERR_NOTEXEC "upd-cast no existe o version antigua -requerida 2009-"|| return $? +echo $ISUDPCAST | grep "not found" > /dev/null && (ogRaiseError $OG_ERR_NOTEXEC "upd-cast no existe " || return $?) ############ BEGIN NUMBERS PARAMETERS CHECK AND SESSION OPTIONS IF CLIENT OR SERVER ############## # Definimos los parametros de la funcion segun la opcion de envio/recepcion. @@ -446,7 +446,7 @@ SYNTAXSERVER="udp-sender $MBUFFER --nokbd --portbase $PORTBASE --$METHOD --mcast ##### BEGIN CLIENT SESSION ##### #La primera opcion PORTBASE, ya esta controlado. Porque es comun al server y al cliente. #La segunda opcion de la sesion para el cliente:: SERVERADDRES -if ogCheckIpAddress ${SESSION[1]} +if ogCheckIpAddress ${SESSION[1]} 2>/dev/null then SERVERADDRESS=" --mcast-rdv-address ${SESSION[1]}" else @@ -497,39 +497,39 @@ if ogCheckStringInReg ${SESSION[2]} "^[0-9]{1,10}$" &>/dev/null then case ${SESSION[2]} in 0) - ERRORSESSION=" " + STARTTIMEOUT=" " ;; *) - ERRORSESSION=" --start-timeout ${SESSION[2]}" + STARTTIMEOUT=" --start-timeout ${SESSION[2]}" ;; esac else #asignamos valor definido en el engine.cfg - ERRORSESSION=" --start-timeout $MCASTERRORSESSION" + STARTTIMEOUT=" --start-timeout $MCASTERRORSESSION" fi #La cuarta opcion de la sesion para el cliente: ${SESSION[2]} ERROR TRANSFER - TIMEOUT EEOR IF NOT RECEIVER DATA FROM SERVER if ogCheckStringInReg ${SESSION[3]} "^[0-9]{1,10}$" &>/dev/null then case ${SESSION[3]} in 0) - ABORTTRANSMISSION=" " + RECEIVERTIMEOUT=" " ;; *) - ABORTTRANSMISSION=" --receive-timeout ${SESSION[3]}" + RECEIVERTIMEOUT=" --receive-timeout ${SESSION[3]}" ;; esac else #asignamos valor definido en el engine.cfg - ABORTTRANSMISSION=" --receive-timeout $MCASTWAIT" + RECEIVERTIMEOUT=" --receive-timeout $MCASTWAIT" fi #Componenemos la sesion multicast del cliente -SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE $SERVERADDRESS $ERRORSESSION $ABORTTRANSMISSION --log /tmp/mcast.log" +SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE $SERVERADDRESS $STARTTIMEOUT $RECEIVERTIMEOUT --log /tmp/mcast.log" ########################################################################## #### END CLIENT SESSION ############## ######## BEGIN MAIN PROGAM ##### case "$1" in -SENDPARTITION) + SENDPARTITION) PROG1=`ogCreateImageSyntax $DEVICE " " $TOOL $LEVEL | awk -F"|" '{print $1 "|" $3}' | tr -d ">"` echo "$PROG1 | $SYNTAXSERVER" ;; |