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 5e6cd6fa46b697e9568ae007fc2e96f3cac0b72c..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 */
@@
-1231,4
+1237,3
@@
fill-column:79
indent-tabs-mode:nil
End:
*/
indent-tabs-mode:nil
End:
*/
-/* arch-tag:61ONz2p/LWaDRnToGI2+fg */