]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix ppdInstallableConflict conflict reporting
authorAlbert Astals Cid <albert.astals.cid@kdab.com>
Tue, 2 Jan 2018 15:17:07 +0000 (16:17 +0100)
committerAlbert Astals Cid <albert.astals.cid@kdab.com>
Tue, 2 Jan 2018 15:17:07 +0000 (16:17 +0100)
Without this patch it was taking all constraints into account, not only the ones
regarding the passed option so if you had a conflict somewhere else, every other
single option would be said to be conflicting which doesn't match what the
documentation says this function should do.

cups/ppd-conflicts.c

index 72b476c15486f5f701dbd4dca37fcec4d9de8441..ff4d0570d3321b2de854494db9164dded88da699 100644 (file)
@@ -993,7 +993,7 @@ ppd_test_constraints(
     if (!consts->installable && which == _PPD_INSTALLABLE_CONSTRAINTS)
       continue;                                /* Skip non-installable option constraint */
 
-    if (which == _PPD_OPTION_CONSTRAINTS && option)
+    if ((which == _PPD_OPTION_CONSTRAINTS || which == _PPD_INSTALLABLE_CONSTRAINTS) && option)
     {
      /*
       * Skip constraints that do not involve the current option...