X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fprotector-plugin%2Fsliding_window.cc;h=f278be4914ca7a23bc5507091e1deeec5c549b40;hb=refs%2Fchanges%2F01%2F2001%2F2;hp=71eefe8a897b058eda3b95ad21402ef9cd42d296;hpb=b9d7e9c232a4371ddfed51c58e5a57f87b057229;p=ric-app%2Fadmin.git diff --git a/src/protector-plugin/sliding_window.cc b/src/protector-plugin/sliding_window.cc index 71eefe8..f278be4 100644 --- a/src/protector-plugin/sliding_window.cc +++ b/src/protector-plugin/sliding_window.cc @@ -52,11 +52,6 @@ bool sliding_window::update_window(unsigned int events){ int shift = std::chrono::duration_cast(current_edge - leading_edge_).count(); - if (shift < 0){ - // we do not update any events if they happened in the past - // by more than unit of window .. (1 second currently) - return false; - } // Advance window if shift >= 1 if (shift >= 1){ @@ -100,7 +95,7 @@ bool sliding_window::update_window(unsigned int events){ bool sliding_window::resize_window(unsigned int window_size){ if (window_size < MIN_WINDOW_SIZE || window_size > MAX_WINDOW_SIZE){ std::stringstream ss; - ss << "Error ::" << __FILE__ << ","<< __LINE__ << " window size must be in [ " << MIN_WINDOW_SIZE << "," << MAX_WINDOW_SIZE << "]" << std::endl; + ss << "Error ::" << __FILE__ << ","<< __LINE__ << " Illegal window size ! window size must be in [ " << MIN_WINDOW_SIZE << "," << MAX_WINDOW_SIZE << "]" << std::endl; error_string = ss.str(); return false; }