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.
*/
public int synchronizeRepository(ProgressFeedback feedback) throws ServiceException {
boolean sessionValid = createAndCheckSession();
if (!sessionValid) {
throw new ServiceException("No valid server session found");
}
String serverHostPort = getServerHostPort();
if (serverHostPort == null) {
throw new ServiceException("No wiki server configured");
@@ -241,12 +246,6 @@ public class SynchronizeWikiClient {
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
ListModifiedFilesXml listModifiedFilesXml = new ListModifiedFilesXml();
listModifiedFilesXml.version = PROTOCOL_VERSION;