diff src/c/urweb.c @ 2283:4afaab523213

Initialize invalidation to NULL!
author Ziv Scully <ziv@mit.edu>
date Thu, 12 Nov 2015 10:06:07 -0500
parents 19b233bb3176
children 472b4504aef2
line wrap: on
line diff
--- a/src/c/urweb.c	Thu Nov 12 09:47:20 2015 -0500
+++ b/src/c/urweb.c	Thu Nov 12 10:06:07 2015 -0500
@@ -585,6 +585,7 @@
 
   ctx->numRecording = 0;
   ctx->recordingOffset = 0;
+  ctx->inval = NULL;
 
   ctx->remoteSock = -1;
 
@@ -4732,9 +4733,11 @@
   inval->keys = keys;
   inval->next = NULL;
   if (ctx->inval) {
+    // An invalidation is already registered, so just extend it.
     ctx->inval->next = inval;
   } else {
     uw_register_transactional(ctx, inval, uw_Sqlcache_flushCommit, NULL, uw_Sqlcache_flushFree);
   }
+  // [ctx->inval] should always point to the last invalidation.
   ctx->inval = inval;
 }