+2006-12-08 Sebastien Pouliot <sebastien@ximian.com>
+
+ * ClientSessionCache.cs: Fix cache to be really used. Original patch
+ by Roy Versteeg. Fix bug #80175.
+
2006-12-08 Sebastien Pouliot <sebastien@ximian.com>
* ClientSessionCache.cs: Check for a new environment variable to
}
// only called inside the lock
- static private ClientSessionInfo FromContext (Context context)
+ static private ClientSessionInfo FromContext (Context context, bool checkValidity)
{
if (context == null)
return null;
return null;
// yes, so what's its status ?
- if (!si.Valid) {
+ if (checkValidity && !si.Valid) {
si.Dispose ();
cache.Remove (uid);
return null;
static public bool SetContextInCache (Context context)
{
lock (locker) {
- ClientSessionInfo csi = FromContext (context);
+ // Don't check the validity because the masterKey of the ClientSessionInfo
+ // can still be null when this is called the first time
+ ClientSessionInfo csi = FromContext (context, false);
if (csi == null)
return false;
static public bool SetContextFromCache (Context context)
{
lock (locker) {
- ClientSessionInfo csi = FromContext (context);
+ ClientSessionInfo csi = FromContext (context, true);
if (csi == null)
return false;