return -1;
}
- if ((p = strchr(host, '@')) != NULL) {
+ if ((p = strrchr(host, '@')) != NULL) {
user = host;
host = p+1;
*p = '\0';
}
- if (rsync_port == 0)
- rsync_port = RSYNC_PORT;
-
fd = open_socket_out_wrapped(host, rsync_port, bind_address,
default_af_hint);
if (fd == -1)
read_only = 1;
if (lp_transfer_logging(i)) {
- if (strstr(lp_log_format(i), "%i") != NULL)
+ if (log_format_has(lp_log_format(i), 'i'))
daemon_log_format_has_i = 1;
if (daemon_log_format_has_i
- || strstr(lp_log_format(i), "%o") != NULL)
+ || log_format_has(lp_log_format(i), 'o'))
daemon_log_format_has_o_or_i = 1;
}