/n/sources/plan9/sys/src/cmd/webfs/client.c:233,258 - client.c:233,259 char *name; int type; void *offset; + void *offset2; }; Ctab ctltab[] = { - "acceptcookies", Bool, (void*)offsetof(Ctl, acceptcookies), - "sendcookies", Bool, (void*)offsetof(Ctl, sendcookies), - "redirectlimit", Int, (void*)offsetof(Ctl, redirectlimit), - "useragent", String, (void*)offsetof(Ctl, useragent), + "acceptcookies", Bool, (void*)offsetof(Ctl, acceptcookies), 0, + "sendcookies", Bool, (void*)offsetof(Ctl, sendcookies), 0, + "redirectlimit", Int, (void*)offsetof(Ctl, redirectlimit), 0, + "useragent", String, (void*)offsetof(Ctl, useragent), 0, }; Ctab globaltab[] = { - "chatty9p", Int, &chatty9p, - "fsdebug", Int, &fsdebug, - "cookiedebug", Int, &cookiedebug, - "urldebug", Int, &urldebug, - "httpdebug", Int, &httpdebug, + "chatty9p", Int, &chatty9p, 0, + "fsdebug", Int, &fsdebug, 0, + "cookiedebug", Int, &cookiedebug, 0, + "urldebug", Int, &urldebug, 0, + "httpdebug", Int, &httpdebug, 0, }; Ctab clienttab[] = { - "baseurl", XUrl, (void*)offsetof(Client, baseurl), - "url", XUrl, (void*)offsetof(Client, url), + "baseurl", XUrl, (void*)offsetof(Client, baseurl), 0, + "url", XUrl, (void*)offsetof(Client, url), (void*)offsetof(Client, baseurl), }; static Ctab* /n/sources/plan9/sys/src/cmd/webfs/client.c:267,273 - client.c:268,274 } static void - parseas(Req *r, char *arg, int type, void *a) + parseas(Req *r, char *arg, int type, void *a, void *b) { Url *u; char e[ERRMAX]; /n/sources/plan9/sys/src/cmd/webfs/client.c:284,290 - client.c:285,291 *(char**)a = estrdup(arg); break; case XUrl: - u = parseurl(arg, nil); + u = parseurl(arg, *(Url**)b); if(u == nil){ snprint(e, sizeof e, "parseurl: %r"); respond(r, e); /n/sources/plan9/sys/src/cmd/webfs/client.c:312,318 - client.c:313,319 if((t = findcmd(cmd, ctltab, nelem(ctltab))) == nil) return 0; a = (void*)((uintptr)ctl+(uintptr)t->offset); - parseas(r, arg, t->type, a); + parseas(r, arg, t->type, a, 0); return 1; } /n/sources/plan9/sys/src/cmd/webfs/client.c:319,331 - client.c:320,333 int clientctlwrite(Req *r, Client *c, char *cmd, char *arg) { - void *a; + void *a, *b; Ctab *t; if((t = findcmd(cmd, clienttab, nelem(clienttab))) == nil) return 0; a = (void*)((uintptr)c+(uintptr)t->offset); - parseas(r, arg, t->type, a); + b = (void*)((uintptr)c+(uintptr)t->offset2); + parseas(r, arg, t->type, a, b); return 1; } /n/sources/plan9/sys/src/cmd/webfs/client.c:338,344 - client.c:340,346 if((t = findcmd(cmd, globaltab, nelem(globaltab))) == nil) return 0; a = t->offset; - parseas(r, arg, t->type, a); + parseas(r, arg, t->type, a, 0); return 1; }