This commit is contained in:
Herbert Reiter
2020-01-04 23:04:13 +01:00
parent 55b854b3d9
commit cb92d6c7b2
@@ -225,6 +225,11 @@ public class SynchronizeWikiClient {
* @return Anzahl der synchronisierten Dateien. * @return Anzahl der synchronisierten Dateien.
*/ */
public int synchronizeRepository(ProgressFeedback feedback) throws ServiceException { public int synchronizeRepository(ProgressFeedback feedback) throws ServiceException {
boolean sessionValid = createAndCheckSession();
if (!sessionValid) {
throw new ServiceException("No valid server session found");
}
String serverHostPort = getServerHostPort(); String serverHostPort = getServerHostPort();
if (serverHostPort == null) { if (serverHostPort == null) {
throw new ServiceException("No wiki server configured"); throw new ServiceException("No wiki server configured");
@@ -241,12 +246,6 @@ public class SynchronizeWikiClient {
lastSyncServerTime = new Date(lastSyncServerTimeMs); lastSyncServerTime = new Date(lastSyncServerTimeMs);
} }
// Aktuelle Session überprüfen
boolean[] checkResult = checkSession(serverHostPort);
if (!checkResult[1]) {
throw new ServiceException("Client not authenticated at wiki server");
}
// Anfrage schicken // Anfrage schicken
ListModifiedFilesXml listModifiedFilesXml = new ListModifiedFilesXml(); ListModifiedFilesXml listModifiedFilesXml = new ListModifiedFilesXml();
listModifiedFilesXml.version = PROTOCOL_VERSION; listModifiedFilesXml.version = PROTOCOL_VERSION;