Return expiration on versioned read.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Sat, 10 Mar 2007 21:56:01 +0000 (21:56 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Sat, 10 Mar 2007 21:56:01 +0000 (21:56 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@268 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/impl/MemoryStorageService.cpp

index 697c55e..9fd63be 100644 (file)
@@ -247,12 +247,12 @@ int MemoryStorageService::readString(const char* context, const char* key, strin
         return 0;
     else if (time(NULL) >= i->second.expiration)
         return 0;
+    if (pexpiration)
+        *pexpiration = i->second.expiration;
     if (i->second.version == version)
         return version; // nothing's changed, so just echo back the version
     if (pvalue)
         *pvalue = i->second.data;
-    if (pexpiration)
-        *pexpiration = i->second.expiration;
     return i->second.version;
 }