ref: 3681c836cae7455826e28c62ccc48ba5c3a44769
parent: 3889b249d4b18acc2ec85e0a88e0f1c306b4dd29
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Dec 1 12:24:02 EST 2019
fix typo: we don't have cache insurance.
--- a/sys/src/cmd/upas/fs/cache.c
+++ b/sys/src/cmd/upas/fs/cache.c
@@ -388,7 +388,7 @@
}
int
-insurecache(Mailbox *mb, Message *m)
+ensurecache(Mailbox *mb, Message *m)
{
if((m->deleted & ~Deleted) != 0 || !m->inmbox)
return -1;
--- a/sys/src/cmd/upas/fs/dat.h
+++ b/sys/src/cmd/upas/fs/dat.h
@@ -204,7 +204,7 @@
int cacheheaders(Mailbox*, Message*); /* "getcache" */
int cachebody(Mailbox*, Message*);
int cacheidx(Mailbox*, Message*);
-int insurecache(Mailbox*, Message*);
+int ensurecache(Mailbox*, Message*);
/**/
void putcache(Mailbox*, Message*); /* asymmetricial */
--- a/sys/src/cmd/upas/fs/idx.c
+++ b/sys/src/cmd/upas/fs/idx.c
@@ -88,7 +88,7 @@
{
for(; m; m = m->next){
if(l == 0)
- if(insurecache(mb, m) == -1)
+ if(ensurecache(mb, m) == -1)
continue;
if(pridxmsg(b, m))
return -1;
@@ -228,7 +228,7 @@
}
/*
- * n.b.: we don't insure this is the index version we last read.
+ * n.b.: we don't ensure this is the index version we last read.
*
* we may overwrite changes. dualing deletes should sync eventually.
* mboxsync should complain about missing messages but
--- a/sys/src/cmd/upas/fs/mbox.c
+++ b/sys/src/cmd/upas/fs/mbox.c
@@ -93,7 +93,7 @@
} else if(!doplumb)
m->cstate &= ~Cnew;
if(m->cstate & Cnew){
- if(insurecache(mb, m) == 0){
+ if(ensurecache(mb, m) == 0){
if(doplumb)
mailplumb(mb, m);
msgdecref(mb, m);