From:	MERC::"uunet!VM1.NODAK.EDU!OWNER-ANU-NEWS"  3-MAR-1993 13:12:35.65
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@VM1.NoDak.EDU>
CC:	
Subj:	Re: V6.1 Beta 6 news cache problem

In article <1993Mar2.092357.491@condor.navsses.navy.mil>, system@condor.navsses.
navy.mil writes:
> I am running V6.1 Beta 6 and I have attempted to turn off the cache, but I
> can't seem to get it completely off!

Try the following patch.
--
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@kuhub.cc.ukans.edu, sloane@ukanvax.bitnet, AT&T: (913)864-0444

*** [.news_v61_src]cache.c
--- [.news_src]cache.c
**************
*** 93,99
                             (&lnm_value), (&lnm_length), 0};

    if (check_lnm != -1)
!       return check_lnm;
    else {
        $DESCRIPTOR( tabnam_desc, "LNM$SYSTEM" );
        $DESCRIPTOR( lognam_desc, CACHE_LOGNAME );
--- 93,99 -----
                             (&lnm_value), (&lnm_length), 0};

    if (check_lnm != -1)
!       return (check_lnm & 1);
    else {
        $DESCRIPTOR( tabnam_desc, "LNM$SYSTEM" );
        $DESCRIPTOR( lognam_desc, CACHE_LOGNAME );
**************
*** 136,143
        int status;

        cache_init_lock();
-       status = sys$enqw( 0, LCK$K_EXMODE, &cache_lksb, LCK$M_CONVERT,
-           0, 0, 0, 0, 0, 0, 0 );
        if (cache->cache_lock_check == 1) { /* double check locking */
            /* something has gone seriously wrong with the locking! */
            open_log_file( CACHE_LOG_FILENAME );
--- 136,141 -----
        int status;

        cache_init_lock();
        if (cache->cache_lock_check == 1) { /* double check locking */
            /* something has gone seriously wrong with the locking! */
            open_log_file( CACHE_LOG_FILENAME );
**************
*** 142,147
            /* something has gone seriously wrong with the locking! */
            open_log_file( CACHE_LOG_FILENAME );
            write_log_file( "Lock check variable already set to 1." );
        }
        cache->cache_lock_check = 1;
        cache_signal( status );
--- 140,146 -----
            /* something has gone seriously wrong with the locking! */
            open_log_file( CACHE_LOG_FILENAME );
            write_log_file( "Lock check variable already set to 1." );
+           cache_free_lock(cache);
        }
        status = sys$enqw( 0, LCK$K_EXMODE, &cache_lksb, LCK$M_CONVERT,
            0, 0, 0, 0, 0, 0, 0 );
**************
*** 143,148
            open_log_file( CACHE_LOG_FILENAME );
            write_log_file( "Lock check variable already set to 1." );
        }
        cache->cache_lock_check = 1;
        cache_signal( status );
  }
--- 142,149 -----
            write_log_file( "Lock check variable already set to 1." );
            cache_free_lock(cache);
        }
+       status = sys$enqw( 0, LCK$K_EXMODE, &cache_lksb, LCK$M_CONVERT,
+           0, 0, 0, 0, 0, 0, 0 );
        cache->cache_lock_check = 1;
        cache_signal( status );
  }
