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

_flag_disable_network_circuit_connect, _flag_disable_idna_stringprep, no PERSISTENT_MASTERS

This commit is contained in:
psyc://loupsycedyglgamf.onion/~lynX 2018-05-11 17:08:52 +02:00
parent 04a4908877
commit 2e459558f5
3 changed files with 13 additions and 6 deletions

View file

@ -261,29 +261,31 @@ runQ() {
}
connect(ho, po, transport, srv, extra) {
#ifndef _flag_disable_network_circuit_connect
if (interactive()) return -8;
P3(("connect: %O, %O, %O, %O for %O\n", ho, po, transport, srv, ME))
if (time() < time_of_connect_attempt + waitforme) return -2;
if (ho) { // paranoid: stringp(ho) && strlen(ho)) {
if (po) port = po;
#ifndef ERQ_WITHOUT_SRV
# ifndef ERQ_WITHOUT_SRV
if (srv) {
hostname = lower_case(ho);
host = 0;
} else
#endif
# endif
host = lower_case(ho);
P2(("connect.%s:\t%O, %O, %O\t%O\n", srv || "to",
ho, po, transport, ME))
}
#ifndef ERQ_WITHOUT_SRV
# ifndef ERQ_WITHOUT_SRV
P4(("connect->srv_choose? depends on srv %O\n", srv))
if (srv) return dns_srv_resolve(hostname, srv, // _psyc._tls.domain
transport == "s" ? "tls" : "tcp", #'srv_choose,
transport);
#endif
# endif
if (::connect(host, port, transport, extra) >= 0)
time_of_connect_attempt = time();
#endif
}
disconnected(remaining) {