s3:winbind: Make wb_seqnums.c update the winbind cache seqnums
authorVolker Lendecke <vl@samba.org>
Tue, 25 Aug 2009 10:29:25 +0000 (12:29 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 29 Aug 2009 17:42:25 +0000 (19:42 +0200)
source3/winbindd/wb_seqnums.c

index f4044338a19b4813e39d05092f3bd5a220f16a20..e6efb9b99ab5b6c7f20735884e497bf81858aff2 100644 (file)
@@ -1,6 +1,8 @@
 /*
    Unix SMB/CIFS implementation.
-   async seqnums
+
+   async seqnums, update the seqnums in winbindd_cache.c
+
    Copyright (C) Volker Lendecke 2009
 
    This program is free software; you can redistribute it and/or modify
@@ -100,7 +102,16 @@ static void wb_seqnums_done(struct tevent_req *subreq)
                        state->stati[i] = status;
                        if (NT_STATUS_IS_OK(status)) {
                                state->seqnums[i] = seqnum;
+
+                               /*
+                                * This first assignment might be removed
+                                * later
+                                */
                                state->domains[i]->sequence_number = seqnum;
+
+                               wcache_store_seqnum(state->domains[i]->name,
+                                                   state->seqnums[i],
+                                                   time(NULL));
                        }
                        break;
                }