reset/sanlk_resetd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ff5cd9d88c55170c3bd255a3fcf24674fc268fb2
Author: Nir Soffer <nsoffer(a)redhat.com>
Date: Mon Aug 11 16:16:11 2014 -0500
reset: Use find_ls to remove lockspace by name
find_ls was introduced recently, use it to find a lockspace by name fro
unregistering, instead of duplicating the search loop.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
diff --git a/reset/sanlk_resetd.c b/reset/sanlk_resetd.c
index 6e55404..d3ea158 100644
--- a/reset/sanlk_resetd.c
+++ b/reset/sanlk_resetd.c
@@ -519,12 +519,12 @@ static void process_update(int fd)
} else if (!strcmp(cmd, "end")) {
log_debug("process_update end %s", name);
- for (i = 0; i < MAX_LS; i++) {
- if (!ls_names[i] || strcmp(ls_names[i], name))
- continue;
+ i = find_ls(name);
+ if (i > -1) {
unregister_ls(i);
return;
}
+
} else if (!strcmp(cmd, "clear")) {
log_debug("process_update clear %s", name);
Show replies by thread