Skip to content

Commit

Permalink
helperFunctions/isValidUrl(): Added a 1 second timeout to the ping co…
Browse files Browse the repository at this point in the history
…mmand. When checking hosts that do not respond to echo requests, this check - which is done for source and destination of a transfer - until now added a delay of 10 seconds.
  • Loading branch information
fscheiner committed Feb 20, 2014
1 parent 524445b commit 39f40bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
2013-12-00 Frank Scheiner <[email protected]>
2014-02-20 Frank Scheiner <[email protected]>

gtransfer dist v0.3.0:
*0.3.0 (gtransfer dist):

For native OS packages (like RPMs) all tools now use `/usr/share/gtransfer` as
base path for bash libraries. This fixes [issue #26].

Integrated a 1 second timeout to the ping command in
`helperFunctions/isValidUrl()` to keep wait time low when transferring between
hosts not answering echo requests.

[issue #26]: https://github.com/fr4nk5ch31n3r/gtransfer/issues/26

2013-10-14 Frank Scheiner <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0BETA1
0.3.0BETA2
4 changes: 2 additions & 2 deletions lib/gtransfer/helperFunctions.bashlib
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ COPYRIGHT
# DEFINES
################################################################################

readonly _helperFunctions_Version="0.1.0"
readonly _helperFunctions_Version="0.2.0"

################################################################################
# INCLUDES
Expand Down Expand Up @@ -545,7 +545,7 @@ helperFunctions/isValidUrl()
#+ to indicate a general problem.
hostName=$( helperFunctions/getFQDNFromURL "$url" )
if [[ "$hostName" != "" ]]; then
ping -c 1 "$hostName" &>/dev/null
ping -w 1 -c 1 "$hostName" &>/dev/null

if [[ $? -eq 2 ]]; then
return 1
Expand Down

0 comments on commit 39f40bc

Please sign in to comment.