File multipath-tools-fix-weightedpath-merge-error of Package multipath-tools

From 297a4a148a8469e272c6ed0cfb394a38a324fb0b Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 12 Dec 2008 14:41:51 +0100
Subject: [PATCH] Fix merge error from prio_weightedpath

Merge error.

References: 441007

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 libmultipath/dict.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index 9ba3961..09ecf51 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -640,14 +640,17 @@ hw_prio_handler(vector strvec)
 		return 1;
 	temp = buff;
 
-	while ((result = strsep(&temp, split_char))) {
-		if (prio_lookup(result)) {
-			conf->prio_name = STRDUP(result);
-			if (temp)
-				conf->prio_arg = STRDUP(temp);
-			else
-				conf->prio_arg = NULL;
-			break;
+	while (temp) {
+		result = strsep(&temp, split_char);
+		if (strcmp(result, "")) {
+			if (prio_lookup(result)) {
+				hwe->prio_name = STRDUP(result);
+				if (temp)
+					hwe->prio_arg = STRDUP(temp);
+				else
+					hwe->prio_arg = NULL;
+				break;
+			}
 		}
 	}
 
-- 
1.6.0.2

openSUSE Build Service is sponsored by