This commit is contained in:
mischief 2014-06-27 23:51:14 -07:00
commit 9d30b0f32d
2 changed files with 17 additions and 9 deletions

View file

@ -45,10 +45,7 @@ struct Ptprpc
uchar type[2]; uchar type[2];
uchar code[2]; uchar code[2];
uchar transid[4]; uchar transid[4];
union { uchar d[52];
uchar p[5][4];
uchar d[52];
};
}; };
struct Node struct Node
@ -225,7 +222,7 @@ vptprpc(Ioproc *io, int code, int flags, va_list a)
for(i=0; i<np; i++){ for(i=0; i<np; i++){
int x = va_arg(a, int); int x = va_arg(a, int);
PUT4(rpc.p[i], x); PUT4(rpc.d + i*4, x);
} }
if(debug) if(debug)
hexdump("req>", (uchar*)&rpc, n); hexdump("req>", (uchar*)&rpc, n);
@ -351,10 +348,10 @@ Resp1:
if(flags & OutParam){ if(flags & OutParam){
int *pp; int *pp;
for(i=0; i<nelem(rpc.p); i++){ for(i=0; i<5; i++){
if((pp = va_arg(a, int*)) == nil) if((pp = va_arg(a, int*)) == nil)
break; break;
*pp = GET4(rpc.p[i]); *pp = GET4(rpc.d + i*4);
} }
} }
return 0; return 0;
@ -1040,7 +1037,7 @@ threadmain(int argc, char **argv)
time0 = time(0); time0 = time(0);
snprint(name, sizeof name, "sdU%d.0", d->id); snprint(name, sizeof name, "sdU%d", d->id);
snprint(desc, sizeof desc, "%d.ptp", d->id); snprint(desc, sizeof desc, "%d.ptp", d->id);
threadpostsharesrv(&fs, nil, name, desc); threadpostsharesrv(&fs, nil, name, desc);

View file

@ -9,7 +9,18 @@
#pragma varargck type "Z" char* #pragma varargck type "Z" char*
int doublequote(Fmt*); int doublequote(Fmt*);
int pipeline = 1;
// if pipeline == 1 and upas/fs is used with dovecot,
// 9Xn OK responses sometimes come much later after FETCH responses, i.e.
// <- * 1 FETCH ...
// <- * 2 FETCH ...
// <- * 3 FETCH ...
// <- 9X5 OK Fetch completed.
// <- 9X6 OK Fetch completed.
// download 40: did not get message body
// <- 9X7 OK Fetch completed.
// causing multiple messages to turn into one in imap4.c:/^imap4resp.
int pipeline = 0;
static char Eio[] = "i/o error"; static char Eio[] = "i/o error";