User story RICPLT-2620
[ric-app/admin.git] / src / protector-plugin / sliding_window.cc
index 71eefe8..f278be4 100644 (file)
@@ -52,11 +52,6 @@ bool  sliding_window::update_window(unsigned int events){
   
   int shift = std::chrono::duration_cast<std::chrono::seconds>(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;
   }