From 11b61670fda7bd58e8d2ba8577b14f5bf5bb8634 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 30 Jul 2009 18:59:10 +0000 Subject: [PATCH] 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 --- bin/AST_CRON_audio_3_ftp.pl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/bin/AST_CRON_audio_3_ftp.pl b/bin/AST_CRON_audio_3_ftp.pl index c0f66b1f..e7ad5a9b 100644 --- a/bin/AST_CRON_audio_3_ftp.pl +++ b/bin/AST_CRON_audio_3_ftp.pl @@ -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='';