1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

death the query_server_unl()

This commit is contained in:
psyc://psyced.org/~lynX 2009-01-29 17:31:32 +01:00
parent 14c65f90a8
commit 821fb55b20
23 changed files with 54 additions and 62 deletions

View file

@ -136,7 +136,7 @@ int greet() {
#ifdef FORK // {{{
emit(S_GLYPH_PACKET_DELIMITER "\n");
emit("\
=_source "+ query_server_unl() +"\n\
=_source "+ SERVER_UNIFORM +"\n\
=_target_peer psyc://"+ peeraddr +"/\n\
=_available_characters UTF-8\n\
=_available_protocols " PROTS "\n\
@ -157,7 +157,7 @@ Available protocols: [_available_protocols].\n" S_GLYPH_PACKET_DELIMITER "\n");
// other side tells us her name
emit(S_GLYPH_PACKET_DELIMITER "\n");
emit("\
:_source "+ query_server_unl() +"\n\
:_source "+ SERVER_UNIFORM +"\n\
:_target_peer psyc://"+ peeraddr +"/\n"
"\n\
:_implementation "+ SERVER_VERSION +" "+ DRIVER_VERSION +" "+ OSTYPE +" "+ MACHTYPE +"\n\
@ -167,7 +167,7 @@ Hello [_target_peer].\n\
Circuit to [_source] running [_implementation] established.\n" S_GLYPH_PACKET_DELIMITER "\n");
// ;ISO-8859-1;ISO-8859-15\n
emit("\
:_source "+ query_server_unl() +"\n\
:_source "+ SERVER_UNIFORM +"\n\
\n\
:_available_hashes "
#if __EFUN_DEFINED__(sha1)
@ -314,12 +314,12 @@ int logon(int neverfails) {
#ifdef FORK // {{{
// init the out-state. these will be sent by greet()
_o = ([
"_source" : query_server_unl(),
"_source" : SERVER_UNIFORM,
"_target" : "psyc:"+ peeraddr +"/",
]);
memory = copy(_o);
#if 0
memory = ([ "_source" : query_server_unl(); 4,
memory = ([ "_source" : SERVER_UNIFORM; 4,
"_target" : "psyc:" + peeraddr +"/"; 4,
]);
#endif

View file

@ -80,7 +80,7 @@ varargs int rootMsg(mixed source, string mc, string data,
croak("_request_compression",
"Requesting compression using [_method]",
([ "_method" : "zlib" ]),
query_server_unl());
SERVER_UNIFORM);
return;
}
#endif
@ -89,14 +89,14 @@ varargs int rootMsg(mixed source, string mc, string data,
if (module == "_encrypt") {
croak("_request_circuit_encrypt",
"Requesting transport layer security",
([ ]), query_server_unl());
([ ]), SERVER_UNIFORM);
return;
}
#endif
}
}
#endif
if (source == query_server_unl()) {
if (source == SERVER_UNIFORM) {
#ifndef __PIKE__ // TPD
if (function_exists("connect_failure"))
connect_failure("_self",
@ -152,7 +152,7 @@ varargs int rootMsg(mixed source, string mc, string data,
croak("_notice_circuit_compress",
"Will restart with compression using [_method]",
([ "_method" : vars["_method"] || "zlib" ]),
query_server_unl());
SERVER_UNIFORM);
enable_telnet(0);
start_mccp_compress(TELOPT_COMPRESS2);
// greet(); // TODO: calling it directly kills pypsyc
@ -166,7 +166,7 @@ varargs int rootMsg(mixed source, string mc, string data,
#else
croak("_error_unavailable_circuit_compress",
"Did I really flaunt compression to you?",
([ ]), query_server_unl());
([ ]), SERVER_UNIFORM);
#endif
break;
case "_request_circuit_encryption":
@ -179,14 +179,14 @@ varargs int rootMsg(mixed source, string mc, string data,
if (t = tls_query_connection_state(ME) == 0) {
croak("_notice_circuit_encrypt",
"Enabling TLS encryption.", ([ ]),
query_server_unl());
SERVER_UNIFORM);
tls_init_connection(ME);
// here we could actually need lars style
// to call greet when ready()
} else if (t > 0) {
/* sendmsg(source, "_error_tls_active",
"TLS is already active",
([ ]), query_server_unl()); */
([ ]), SERVER_UNIFORM); */
P0(("received %O for %O who already has TLS\n", mc, ME))
} else {
// negative numbers (current behaviour of ldmud)
@ -197,7 +197,7 @@ varargs int rootMsg(mixed source, string mc, string data,
// we can not be advertising it
croak("_error_unavailable_circuit_encrypt",
"Can not remember telling you I had TLS.",
([ ]), query_server_unl());
([ ]), SERVER_UNIFORM);
#endif
break;
case "_notice_circuit_encrypt":

View file

@ -173,7 +173,7 @@ object find_psyc_object(array(mixed) u) {
}
}
else unless (user) {
//return 0; // return SERVER_UNI !?
//return 0; // return SERVER_UNIFORM !?
return find_target_handler("/");
}
if (!objectp(o) && user) {

View file

@ -996,7 +996,7 @@ protected int deliver(mixed ip, string host, string mc, string buffer, mapping c
source, t, ME))
unless (cvars["_source_relay"])
cvars["_source_relay"] = source;
source = cvars["_source"] || query_server_unl();
source = cvars["_source"] || SERVER_UNIFORM;
// relay the message!
// this is used by procmail for example, whenever
// it needs to send to an xmpp: recipient.
@ -1101,7 +1101,7 @@ protected int deliver(mixed ip, string host, string mc, string buffer, mapping c
return restart();
}
// else if (t) return _error_rejected_relay_outgoing TODO
t2 = query_server_unl();
t2 = SERVER_UNIFORM;
// this part is new and maybe can be optimized.. TODO
// the main optimization would be to check for is_localhost
// with host part of target