For AST_CRON_audio_3_ftp.pl, Fixed non-VicDial recordings date directory, added secondary icmp ping if standard ping fails

git-svn-id: svn://192.168.202.10@1197 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-07-30 18:59:10 +00:00
parent 426af85077
commit 11b61670fd
+19 -1
View File
@@ -39,8 +39,19 @@
# 80317-2349 - Added FTP debug if debugX
# 80731-2253 - Changed size comparisons for more efficiency
# 90727-1458 - Added GSW format option
# 90730-1454 - Fixed non-VicDial recordings date directory, added secondary icmp ping if standard ping fails
#
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
$FTPdate = "$year-$mon-$mday";
$GSM=0; $MP3=0; $OGG=0; $WAV=0; $GSW=0; $NODATEDIR=0;
# Default variables for FTP
@@ -269,14 +280,21 @@ foreach(@FILES)
}
$sthA->finish();
if (length($start_date) < 6)
{$start_date = $FTPdate;}
if ($DB) {print "|$recording_id|$start_date|$ALLfile| |$SQLfile|\n";}
### BEGIN Remote file transfer
$p = Net::Ping->new();
# $p = Net::Ping->new("icmp");
$ping_good = $p->ping("$VARFTP_host");
if (!$ping_good)
{
$p = Net::Ping->new("icmp");
$ping_good = $p->ping("$VARFTP_host");
}
if ($ping_good)
{
$start_date_PATH='';