chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ac152d0
)
cgi: actually use the connection from the new login after logging in!
author
rjk@greenend.org.uk
<>
Mon, 31 Dec 2007 10:01:47 +0000
(10:01 +0000)
committer
rjk@greenend.org.uk
<>
Mon, 31 Dec 2007 10:01:47 +0000
(10:01 +0000)
server/dcgi.c
patch
|
blob
|
blame
|
history
diff --git
a/server/dcgi.c
b/server/dcgi.c
index 27c77b1037a85fe89b5d440ff9d0e60e759fac8b..caaea647ced9c68d588d91c1c2af5c51259fddc1 100644
(file)
--- a/
server/dcgi.c
+++ b/
server/dcgi.c
@@
-464,7
+464,8
@@
static void act_login(cgi_sink *output,
expand_template(ds, output, "login");
return;
}
expand_template(ds, output, "login");
return;
}
- c = disorder_new(1);
+ /* We'll need a new connection as we are going to stop being guest */
+ c = disorder_new(0);
if(disorder_connect_user(c, username, password)) {
cgi_set_option("error", "loginfailed");
expand_template(ds, output, "login");
if(disorder_connect_user(c, username, password)) {
cgi_set_option("error", "loginfailed");
expand_template(ds, output, "login");
@@
-475,6
+476,9
@@
static void act_login(cgi_sink *output,
expand_template(ds, output, "login");
return;
}
expand_template(ds, output, "login");
return;
}
+ /* Use the new connection henceforth */
+ ds->g->client = c;
+ ds->g->flags = 0;
/* We have a new cookie */
header_cookie(output->sink);
cgi_set_option("status", "loginok");
/* We have a new cookie */
header_cookie(output->sink);
cgi_set_option("status", "loginok");