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:
parent
04a4908877
commit
2e459558f5
3 changed files with 13 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue