mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
expect TLS autodetect only when libpsyc is compiled in (fixes alice' dot bug)
This commit is contained in:
parent
47232884b9
commit
069a3b66ae
6 changed files with 39 additions and 38 deletions
|
@ -35,7 +35,7 @@ private volatile mapping temp_state;
|
|||
inherit NET_PATH "state";
|
||||
#endif
|
||||
|
||||
#ifdef USE_SPYC
|
||||
#if __EFUN_DEFINED__(psyc_parse)
|
||||
mapping _state; // should probably merge with ifdef CONTEXT_STATE..
|
||||
#endif
|
||||
|
||||
|
@ -47,7 +47,7 @@ void create() {
|
|||
unless(mappingp(cast_state)) cast_state = ([ ]);
|
||||
unless(mappingp(temp_state)) temp_state = ([ ]);
|
||||
#endif
|
||||
#ifdef USE_SPYC
|
||||
#if __EFUN_DEFINED__(psyc_parse)
|
||||
unless(mappingp(_state)) _state = ([ ]);
|
||||
#endif
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ void Diminish(mixed source, string key, mixed value) {
|
|||
|
||||
#endif // }}}
|
||||
|
||||
#ifdef USE_SPYC
|
||||
#if __EFUN_DEFINED__(psyc_parse)
|
||||
get_state() {
|
||||
PT(("cstate for %O picked up by %O: %O\n", ME,
|
||||
previous_object(), _state))
|
||||
|
|
|
@ -1113,23 +1113,17 @@ protected int deliver(mixed ip, string host, string mc, string buffer, mapping c
|
|||
return 1;
|
||||
}
|
||||
|
||||
#if __EFUN_DEFINED__(psyc_parse)
|
||||
// temporary new "lfun" called from driver's comm.c to peek into new connection
|
||||
// only exists if libpsyc is provided
|
||||
void connection_peek(string data) {
|
||||
P4((">> peek: %O\n", data));
|
||||
#ifdef USE_SPYC
|
||||
# if !__EFUN_DEFINED__(psyc_parse)
|
||||
# echo New PSYC syntax will not work: Driver compiled without libpsyc!
|
||||
# endif
|
||||
|
||||
if (data[0] == C_GLYPH_NEW_PACKET_DELIMITER) {
|
||||
# if __EFUN_DEFINED__(enable_binary)
|
||||
enable_binary(ME);
|
||||
# else
|
||||
# echo New PSYC syntax will not work: Driver compiled without enable_binary!
|
||||
raise_error("Driver compiled without enable_binary()");
|
||||
# endif
|
||||
enable_binary(ME);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PSYC_TCP
|
||||
vamixed startParse(string a) {
|
||||
|
@ -1137,8 +1131,7 @@ vamixed startParse(string a) {
|
|||
restart();
|
||||
if (isServer()) greet();
|
||||
}
|
||||
// new syntax is so broken, we should not pretend to support it yet FIXME
|
||||
# if defined(SPYC_PATH) && defined(USE_SPYC)
|
||||
# if defined(SPYC_PATH) && __EFUN_DEFINED__(psyc_parse)
|
||||
else if (a[0] == C_GLYPH_NEW_PACKET_DELIMITER) {
|
||||
object o = clone_object(SPYC_PATH "server");
|
||||
unless (o && exec(o, ME) && o->logon(0)) {
|
||||
|
|
|
@ -86,6 +86,12 @@ void dispatch(mapping rvars, mapping evars, mixed method, mixed body) {
|
|||
}
|
||||
|
||||
void psyc_dispatch(mixed p) {
|
||||
if (p[PACKET_METHOD][0] != '_') {
|
||||
log_file("SPYC", "%O SYNTAX %O\n", query_ip_name(), p);
|
||||
croak("_error_invalid_method_compact",
|
||||
"Compact methods undefined as yet.");
|
||||
QUIT
|
||||
}
|
||||
dispatch(p[PACKET_ROUTING], p[PACKET_ENTITY], p[PACKET_METHOD], p[PACKET_BODY]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue