[multipath] "skip out of scope map" fix
authorChristophe Varoqui <root@xa-s05.(none)>
Wed, 12 Oct 2005 14:24:18 +0000 (16:24 +0200)
committerChristophe Varoqui <root@xa-s05.(none)>
Wed, 12 Oct 2005 14:24:18 +0000 (16:24 +0200)
The logic was accidentaly inverted in the last patch.
And now we drop the map from mpvec when "out of scope".

multipath/main.c

index 4f92392..9325632 100644 (file)
@@ -855,8 +855,13 @@ get_dm_mpvec (vector curmp, vector pathvec, char * refwwid)
                 * discard out of scope maps
                 */
                if (mpp->wwid && refwwid &&
-                   !strncmp(mpp->wwid, refwwid, WWID_SIZE))
-                               continue;
+                   strncmp(mpp->wwid, refwwid, WWID_SIZE)) {
+                       condlog(3, "skip map %s: out of scope", mpp->alias);
+                       free_multipath(mpp, KEEP_PATHS);
+                       vector_del_slot(curmp, i);
+                       i--;
+                       continue;
+               }
 
                condlog(3, "params = %s", mpp->params);
                condlog(3, "status = %s", mpp->status);