From fcf79027472281741908aff68edfde58119b5f09 Mon Sep 17 00:00:00 2001 From: Martok Date: Thu, 14 May 2020 18:14:58 +0200 Subject: [PATCH] Maybe fix #299: correctly handle OnlyShowAvailability calendards after reset/restart Also fix some uninitialized variables --- calendar/interface/exchangeCalendar/mivExchangeCalendar.js | 4 +++- .../interface/exchangeLoadBalancer/mivExchangeLoadBalancer.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/calendar/interface/exchangeCalendar/mivExchangeCalendar.js b/calendar/interface/exchangeCalendar/mivExchangeCalendar.js index a9979e37..4aabd3bb 100644 --- a/calendar/interface/exchangeCalendar/mivExchangeCalendar.js +++ b/calendar/interface/exchangeCalendar/mivExchangeCalendar.js @@ -3093,7 +3093,6 @@ calExchangeCalendar.prototype = { //var self = this; if (this.OnlyShowAvailability) { - if (!this.lastValidRangeStart) this.lastValidRangeStart = aRangeStart.clone(); this.getOnlyFreeBusyInformation(this.lastValidRangeStart, this.lastValidRangeEnd); } else { @@ -4351,6 +4350,9 @@ calExchangeCalendar.prototype = { this.itemCacheByStartDate = {}; this.itemCacheByEndDate = {}; + // Re-evaluate with first request after performStartup() + this.OnlyShowAvailability = false; + for (var index in this.recurringMasterCache) { if (this.recurringMasterCache[index]) { this.recurringMasterCache[index].deleteItem(); diff --git a/common/interface/exchangeLoadBalancer/mivExchangeLoadBalancer.js b/common/interface/exchangeLoadBalancer/mivExchangeLoadBalancer.js index 9445ae18..dbcbd8f7 100644 --- a/common/interface/exchangeLoadBalancer/mivExchangeLoadBalancer.js +++ b/common/interface/exchangeLoadBalancer/mivExchangeLoadBalancer.js @@ -83,7 +83,7 @@ jobObject.prototype = { onRequestError: function _onRequestError(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, job) { //dump(this.server+":jobObject.onRequestError\n"); - this.loadBalancer.logInfo(this.uuid + ":" + this.server + ":jobObject:onRequestError. arg2:" + arg2 + ", arg3:" + arg3); + this.loadBalancer && this.loadBalancer.logInfo(this.uuid + ":" + this.server + ":jobObject:onRequestError. arg2:" + arg2 + ", arg3:" + arg3); try { arg1.argument.cbError(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); }