Browse Source

Plan 9 from Bell Labs 2006-08-26

David du Colombier 14 years ago
parent
commit
d4f1f31f79
4 changed files with 8 additions and 5 deletions
  1. 1 1
      dist/replica/_plan9.db
  2. 1 1
      dist/replica/plan9.db
  3. 1 0
      dist/replica/plan9.log
  4. 5 3
      sys/src/cmd/ip/imap4d/mbox.c

+ 1 - 1
dist/replica/_plan9.db

@@ -12356,7 +12356,7 @@ sys/src/cmd/ip/imap4d/folder.c - 664 sys sys 1015013076 5959
 sys/src/cmd/ip/imap4d/imap4d.c - 664 sys sys 1066325859 40675
 sys/src/cmd/ip/imap4d/imap4d.h - 664 sys sys 1015013076 6697
 sys/src/cmd/ip/imap4d/list.c - 664 sys sys 1015013076 7619
-sys/src/cmd/ip/imap4d/mbox.c - 664 sys sys 1065963776 16849
+sys/src/cmd/ip/imap4d/mbox.c - 664 sys sys 1156547804 16935
 sys/src/cmd/ip/imap4d/mkfile - 664 sys sys 1063897579 332
 sys/src/cmd/ip/imap4d/msg.c - 664 sys sys 1130423893 31401
 sys/src/cmd/ip/imap4d/mutf7.c - 664 sys sys 1015013077 2724

+ 1 - 1
dist/replica/plan9.db

@@ -12356,7 +12356,7 @@ sys/src/cmd/ip/imap4d/folder.c - 664 sys sys 1015013076 5959
 sys/src/cmd/ip/imap4d/imap4d.c - 664 sys sys 1066325859 40675
 sys/src/cmd/ip/imap4d/imap4d.h - 664 sys sys 1015013076 6697
 sys/src/cmd/ip/imap4d/list.c - 664 sys sys 1015013076 7619
-sys/src/cmd/ip/imap4d/mbox.c - 664 sys sys 1065963776 16849
+sys/src/cmd/ip/imap4d/mbox.c - 664 sys sys 1156547804 16935
 sys/src/cmd/ip/imap4d/mkfile - 664 sys sys 1063897579 332
 sys/src/cmd/ip/imap4d/msg.c - 664 sys sys 1130423893 31401
 sys/src/cmd/ip/imap4d/mutf7.c - 664 sys sys 1015013077 2724

+ 1 - 0
dist/replica/plan9.log

@@ -51102,3 +51102,4 @@
 1156453207 6518 a dist/replica/cd - 664 sys sys 1149084099 922
 1156453207 6519 a dist/replica/network - 775 sys sys 1139499513 956
 1156453207 6520 a dist/replica/plan9.proto - 664 sys sys 1144683345 2813
+1156548606 0 c sys/src/cmd/ip/imap4d/mbox.c - 664 sys sys 1156547804 16935

+ 5 - 3
sys/src/cmd/ip/imap4d/mbox.c

@@ -480,7 +480,7 @@ createImp(Box *box, Qid *qid)
 static int
 parseImp(Biobuf *b, Box *box)
 {
-	Msg *m, *mm;
+	Msg *m, *mm = nil;
 	char *s, *t, *toks[3];
 	ulong uid, u;
 	int match, n;
@@ -539,7 +539,8 @@ parseImp(Biobuf *b, Box *box)
 			for(; m != nil && m->uid; m = m->next)
 				;
 			for(mm = m; mm != nil; mm = mm->next){
-				if(strcmp(mm->info[IDigest], toks[0]) == 0){
+				if(mm->info[IDigest] != nil &&
+				    strcmp(mm->info[IDigest], toks[0]) == 0){
 					if(!mm->uid)
 						mm->flags = 0;
 					if(!impFlags(box, mm, toks[2]))
@@ -569,7 +570,8 @@ parseImp(Biobuf *b, Box *box)
 		 * since it comes before all other messages, and therefore
 		 * must be in the .imp file if they should be.
 		 */
-		match = strcmp(m->info[IDigest], toks[0]) == 0;
+		match = mm != nil && mm->info[IDigest] != nil &&
+			strcmp(m->info[IDigest], toks[0]) == 0;
 		if(uid && (m->uid == uid || !m->uid && match)){
 			if(!match)
 				bye("inconsistent uid");