diff --git a/campcaster/src/modules/storageServer/var/Transport.php b/campcaster/src/modules/storageServer/var/Transport.php index e3757b06f..7725d70ea 100644 --- a/campcaster/src/modules/storageServer/var/Transport.php +++ b/campcaster/src/modules/storageServer/var/Transport.php @@ -172,8 +172,8 @@ class Transport * direction: string - up | down * expectedsize: int - file size in bytes * realsize: int - currently transported bytes - * expectedchsum: string - orginal file checksum - * realchsum: string - transported file checksum + * expectedsum: string - orginal file checksum + * realsum: string - transported file checksum * title: string - dc:title or filename etc. * errmsg: string - error message for failed transports * ... ? @@ -187,10 +187,14 @@ class Transport $res = array(); foreach (array( 'trtype', 'state', 'direction', 'expectedsize', 'realsize', - 'expectedchsum', 'realchsum', 'title', 'errmsg' + 'expectedsum', 'realsum', 'title', 'errmsg' ) as $k) { $res[$k] = ( isset($trec->row[$k]) ? $trec->row[$k] : NULL ); } + if ( file_exists($trec->row['localfile']) ){ + $res['realsize'] = filesize($trec->row['localfile']); + $res['realsum'] = $this->_chsum($trec->row['localfile']); + } // do not return finished on finished search job upload // - whole search is NOT finished if ($res['trtype'] == "searchjob" && $res['direction'] == "up" && $res['state'] == "finished") { diff --git a/campcaster/src/modules/storageServer/var/xmlrpc/xr_cli_test.php b/campcaster/src/modules/storageServer/var/xmlrpc/xr_cli_test.php index 497a2e191..77d9ab60b 100644 --- a/campcaster/src/modules/storageServer/var/xmlrpc/xr_cli_test.php +++ b/campcaster/src/modules/storageServer/var/xmlrpc/xr_cli_test.php @@ -159,7 +159,7 @@ $infos = array( "getTransportInfo" => array('m'=>"locstor.getTransportInfo", 'p'=>array('trtok'), - 'r'=>array('state', 'realsize', 'expectedsize', 'realchsum', 'expectedchsum')), + 'r'=>array('state', 'realsize', 'expectedsize', 'realsum', 'expectedsum')), "turnOnOffTransports" => array('m'=>"locstor.turnOnOffTransports", 'p'=>array('sessid', 'onOff'), 'r'=>array('state')), "doTransportAction" => array('m'=>"locstor.doTransportAction", @@ -187,7 +187,7 @@ $infos = array( "createBackupClose" => array('m'=>"locstor.createBackupClose", 'p'=>array('token'), 'r'=>array('status')), "restoreBackupOpen" => array('m'=>"locstor.restoreBackupOpen", - 'p'=>array('sessid', 'filename'), 'r'=>array('url', 'token')), + 'p'=>array('sessid', 'chsum'), 'r'=>array('url', 'token')), "restoreBackupClosePut" => array('m'=>"locstor.restoreBackupClosePut", 'p'=>array('sessid', 'token'), 'r'=>array('token')), "restoreBackupCheck" => array('m'=>"locstor.restoreBackupCheck",