X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/bf4679e8a080ad6eb7cd7799ba09f8578da54c17..3add5835db9692bd6e527e625f7114ac8ed0bdef:/clientserver.c diff --git a/clientserver.c b/clientserver.c index 339c15d1..c8ba5d8e 100644 --- a/clientserver.c +++ b/clientserver.c @@ -88,6 +88,9 @@ int start_socket_client(char *host, char *path, int argc, char *argv[]) *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) @@ -598,6 +601,11 @@ int daemon_main(void) if (!lp_load(config_file, 1)) exit_cleanup(RERR_SYNTAX); + if (rsync_port == 0 && (rsync_port = lp_rsync_port()) == 0) + rsync_port = RSYNC_PORT; + if (bind_address == NULL) + bind_address = lp_bind_address(); + log_init(); rprintf(FLOG, "rsyncd version %s starting, listening on port %d\n",