diff --git a/campcaster/src/modules/storageClient/src/WebStorageClient.cxx b/campcaster/src/modules/storageClient/src/WebStorageClient.cxx index 005fddeac..4637b6b53 100644 --- a/campcaster/src/modules/storageClient/src/WebStorageClient.cxx +++ b/campcaster/src/modules/storageClient/src/WebStorageClient.cxx @@ -756,7 +756,7 @@ const std::string restoreBackupSessionIdParamName = "sessid"; /*------------------------------------------------------------------------------ * The name of the file name parameter in the input structure *----------------------------------------------------------------------------*/ -const std::string restoreBackupFileNameParamName = "filename"; +const std::string restoreBackupChecksumParamName = "chsum"; /*------------------------------------------------------------------------------ * The name of the URL parameter in the input or output structure @@ -2524,14 +2524,22 @@ WebStorageClient :: restoreBackupOpen( Ptr::Ref path) const throw (XmlRpcException) { + std::ifstream ifs(path->c_str()); + if (!ifs) { + ifs.close(); + throw XmlRpcIOException("Could not read the playlist archive file."); + } + std::string md5string = Md5(ifs); + ifs.close(); + XmlRpcValue parameters; XmlRpcValue result; parameters.clear(); parameters[restoreBackupSessionIdParamName] = sessionId->getId(); - parameters[restoreBackupFileNameParamName] - = std::string(*path); + parameters[restoreBackupChecksumParamName] + = md5string; execute(restoreBackupOpenMethodName, parameters, result); diff --git a/campcaster/src/products/gLiveSupport/src/RestoreBackupWindow.cxx b/campcaster/src/products/gLiveSupport/src/RestoreBackupWindow.cxx index 6e17c8b9c..db55e9a4c 100644 --- a/campcaster/src/products/gLiveSupport/src/RestoreBackupWindow.cxx +++ b/campcaster/src/products/gLiveSupport/src/RestoreBackupWindow.cxx @@ -256,6 +256,7 @@ RestoreBackupWindow :: restoreBackupClose(void) throw () try { storage->restoreBackupClose(*token); + token.reset(); } catch (XmlRpcException &e) { signalError(e.what());