connection_fatal("%s", error_msg);
} /* Otherwise, the remote side closed the connection normally. */
return 0;
connection_fatal("%s", error_msg);
} /* Otherwise, the remote side closed the connection normally. */
return 0;
- char buf[200];
- sprintf(buf, "Looking up host \"%.170s\"", host);
- logevent(buf);
+ char *buf;
+ buf = dupprintf("Looking up host \"%s\"", host);
+ logevent(raw->frontend, buf);
+ sfree(buf);
- addr = sk_namelookup(host, realhost);
- if ((err = sk_addr_error(addr)))
+ addr = name_lookup(host, port, realhost);
+ if ((err = sk_addr_error(addr)) != NULL)
- sprintf(buf, "Connecting to %.100s port %d", addrbuf, port);
- logevent(buf);
+ buf = dupprintf("Connecting to %s port %d", addrbuf, port);
+ logevent(raw->frontend, buf);
+ sfree(buf);
}
raw->s = new_connection(addr, *realhost, port, 0, 1, nodelay, (Plug) raw);
}
raw->s = new_connection(addr, *realhost, port, 0, 1, nodelay, (Plug) raw);