From 7a6126210dde41f560570718afa2a99bb7e86052 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Thu, 11 Aug 2011 16:44:21 +0200 Subject: [PATCH] b/f: fix index search for search from the past --- apps/db_reg_agent/RegistrationTimer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/db_reg_agent/RegistrationTimer.cpp b/apps/db_reg_agent/RegistrationTimer.cpp index 9371e272..997c0155 100644 --- a/apps/db_reg_agent/RegistrationTimer.cpp +++ b/apps/db_reg_agent/RegistrationTimer.cpp @@ -237,13 +237,13 @@ bool RegistrationTimer::insert_timer_leastloaded(RegTimer* timer, return false; } - int res_index = from_index; if (from_index < 0) { // use now .. to_index DBG("from_time (%ld) in the past - searching load loaded from now()\n", from_time); from_index = current_bucket; } // find least loaded bucket + int res_index = from_index; size_t least_load = buckets[from_index].timers.size(); int i = from_index;