lib: Move the "expired" for gencache_parse calculation into gencache.c
[vlendec/samba-autobuild/.git] / source3 / winbindd / wb_dsgetdcname.c
index 2f450c7a2b4661031a317b6efbd7266b6ca4766c..cbd2cf6fd78986717780c55f265969a96c607255 100644 (file)
@@ -171,12 +171,14 @@ struct dcinfo_parser_state {
        struct netr_DsRGetDCNameInfo *dcinfo;
 };
 
-static void dcinfo_parser(time_t timeout, DATA_BLOB blob, void *private_data)
+static void dcinfo_parser(const struct gencache_timeout *timeout,
+                         DATA_BLOB blob,
+                         void *private_data)
 {
        struct dcinfo_parser_state *state = private_data;
        enum ndr_err_code ndr_err;
 
-       if (timeout <= time(NULL)) {
+       if (gencache_timeout_expired(timeout)) {
                return;
        }