chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doxygen
[disorder]
/
lib
/
eclient.c
diff --git
a/lib/eclient.c
b/lib/eclient.c
index 971dc4c1e4623b9ca7488588fe109d0d98da3a72..38edb645130ba8cb68675f15bb15bb27c7f8954f 100644
(file)
--- a/
lib/eclient.c
+++ b/
lib/eclient.c
@@
-194,6
+194,10
@@
disorder_eclient *disorder_eclient_new(const disorder_eclient_callbacks *cb,
vector_init(&c->vec);
dynstr_init(&c->input);
dynstr_init(&c->output);
vector_init(&c->vec);
dynstr_init(&c->input);
dynstr_init(&c->output);
+ if(!config->password) {
+ error(0, "no password set");
+ return 0;
+ }
return c;
}
return c;
}
@@
-546,8
+550,10
@@
static void read_input(disorder_eclient *c) {
if(c->state > state_connecting)
consume(&c->input, (nl - c->input.vec) + 1);
}
if(c->state > state_connecting)
consume(&c->input, (nl - c->input.vec) + 1);
}
- if(c->eof)
+ if(c->eof)
{
comms_error(c, "reading from %s: server disconnected", c->ident);
comms_error(c, "reading from %s: server disconnected", c->ident);
+ c->authenticated = 0;
+ }
}
/* called with a line that has just been read */
}
/* called with a line that has just been read */