]> jfr.im git - solanum.git/commitdiff
opm: properly disable opm on blacklist deletions.
authorElizabeth Myers <redacted>
Sun, 3 Apr 2016 03:31:19 +0000 (22:31 -0500)
committerElizabeth Myers <redacted>
Sun, 3 Apr 2016 03:31:19 +0000 (22:31 -0500)
If there are no proxies left (or they're all being cleared), disable
OPM, as it's totally useless from that point.

authd/providers/opm.c

index e93143d068bc70c4aeb1b7ea0ef4b8b247ae47c4..ac299a1281f000b862e7b10c8a52c515fb226b33 100644 (file)
@@ -846,6 +846,9 @@ delete_opm_scanner(const char *key __unused, int parc __unused, const char **par
 
        rb_dlinkDelete(&proxy->node, &proxy_scanners);
        rb_free(proxy);
+
+       if(!rb_dlink_list_length(proxy_scanners))
+               opm_enable = false;
 }
 
 static void
@@ -865,6 +868,8 @@ delete_opm_scanner_all(const char *key __unused, int parc __unused, const char *
        {
                opm_cancel(auth);
        }
+
+       opm_enable = false;
 }