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:
32a1e1e
)
cgi: more graceful error handling in absence of server
author
rjk@greenend.org.uk
<>
Fri, 28 Dec 2007 16:13:46 +0000
(16:13 +0000)
committer
rjk@greenend.org.uk
<>
Fri, 28 Dec 2007 16:13:46 +0000
(16:13 +0000)
lib/client.c
patch
|
blob
|
blame
|
history
tests/cookie.py
patch
|
blob
|
blame
|
history
diff --git
a/lib/client.c
b/lib/client.c
index dc1d44ea4215c832d1f1a9e7e4264e89c86612dd..1dac922363ab7edbe2e6fdbf02384021cc1ab156 100644
(file)
--- a/
lib/client.c
+++ b/
lib/client.c
@@
-165,6
+165,10
@@
static int disorder_simple_v(disorder_client *c,
const char *arg;
struct dynstr d;
+ if(!c->fpout) {
+ error(0, "not connected to server");
+ return -1;
+ }
if(cmd) {
dynstr_init(&d);
dynstr_append_string(&d, cmd);
diff --git
a/tests/cookie.py
b/tests/cookie.py
index c0b71e08bc9d04a2bbc5dea6c93166346d445277..8a9182977286011d0d67fc1ee03295f607f889d1 100755
(executable)
--- a/
tests/cookie.py
+++ b/
tests/cookie.py
@@
-29,6
+29,7
@@
def test():
v = c.version()
print " getting cookie"
k = c.make_cookie()
+ print " cookie value is %s" % k
print " connecting with cookie"
c = disorder.client()
c.connect(k)