summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2017-10-09 12:01:38 +0000
committeririna <irinagomez@us.es>2017-10-09 12:01:38 +0000
commitf864c82716846f1b0342f9cb47b5129401906f7a (patch)
tree93045a97b2226dad4bf61f045e7031ed5492ac8c
parente1e05def4a44dc1803d945645c471490c6229425 (diff)
#786 #678 #781 Adaptación al cliente ogLive-precise-3.2.0: en ogMcastSyntax se modifican opciones de udp-receiver y en ogChangeRepo de df.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5447 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-xclient/engine/Net.lib2
-rwxr-xr-xclient/engine/Protocol.lib17
2 files changed, 11 insertions, 8 deletions
diff --git a/client/engine/Net.lib b/client/engine/Net.lib
index ee8650e2..17c932d2 100755
--- a/client/engine/Net.lib
+++ b/client/engine/Net.lib
@@ -38,7 +38,7 @@ fi
# Si REPO tomamos el repositorio y la unidad organizativa actual
REPO=$(ogGetRepoIp)
-OGUNIT="$(df --output=source | awk -F "/" '/ogimages/ {print $5}')"
+OGUNIT="$(df | awk -F " " '/oglog/ {sub("//.*/oglog","",$1); sub("/","",$1); print $1}')"
# Parametros de entrada. Si $1 = "REPO" dejo el repositorio actual
[ "${1^^}" == "REPO" ] && NEWREPO="$REPO" || NEWREPO="${1}"
diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib
index 15f8d910..20e4a723 100755
--- a/client/engine/Protocol.lib
+++ b/client/engine/Protocol.lib
@@ -343,9 +343,9 @@ fi
function ogMcastSyntax ()
{
-local ISUDPCAST PARM SESSION SESSIONPARM MODE PORTBASE PERROR
+local ISUDPCAST RECEIVERTIMEOUT PARM SESSION SESSIONPARM MODE PORTBASE PERROR
local METHOD ADDRESS BITRATE NCLIENTS MAXTIME CERROR
-local TOOL LEVEL DEVICE MBUFFER SYNTAXSERVER SYNTAXCLIENT
+local TOOL LEVEL DEVICE MBUFFER SYNTAXSERVER SYNTAXCLIENT
# Si se solicita, mostrar ayuda.
if [ "$*" == "help" -o "$2" == "help" ]; then
@@ -365,6 +365,12 @@ PERROR=0
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 $?
+# Si la version de udp-receiver permite --receive-timeout utilizamos la opción
+if echo $ISUDPCAST | grep receive-timeout &>/dev/null; then
+ RECEIVERTIMEOUT=" --receive-timeout $MCASTWAIT"
+else
+ RECEIVERTIMEOUT=""
+fi
# Error si no se reciben $PARM parámetros.
echo "$1" | grep "PARTITION" > /dev/null && PARM=5 || PARM=3
@@ -472,14 +478,11 @@ MCASTWAIT=${MCASTWAIT:-120}
REPOSUBRED=`echo $RIPBT | cut -c1-$MASCARA`
CLIENTSUBRED=`echo $IPBT | cut -c1-$MASCARA`
if [ $REPOSUBRED == $CLIENTSUBRED ]; then
- SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE --start-timeout $MCASTWAIT --receive-timeout $MCASTWAIT"
+ SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE $RECEIVERTIMEOUT --start-timeout $MCASTWAIT"
else
- SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE --mcast-rdv-address $REPOIP --start-timeout $MCASTWAIT --receive-timeout $MCASTWAIT"
+ SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE --mcast-rdv-address $REPOIP $RECEIVERTIMEOUT --start-timeout $MCASTWAIT"
fi
-
-
-
case "$1" in
SENDPARTITION)
PROG1=`ogCreateImageSyntax $DEVICE " " $TOOL $LEVEL | awk -F"|" '{print $1 "|" $3}' | tr -d ">"`