+ remote_argv = argv + argc - 1;
+ remote_argc = 1;
+ }
+
+ if (am_sender) {
+ char *dummy1;
+ int dummy2;
+ int i;
+ /* For local source, extra source args must not have hostspec. */
+ for (i = 1; i < argc; i++) {
+ if (check_for_hostspec(argv[i], &dummy1, &dummy2)) {
+ rprintf(FERROR, "Unexpected remote arg: %s\n", argv[i]);
+ exit_cleanup(RERR_SYNTAX);
+ }
+ }
+ } else {
+ int i;
+ /* For remote source, any extra source args must be ":SOURCE" args. */
+ for (i = 1; i < remote_argc; i++) {
+ if (*remote_argv[i] != ':') {
+ rprintf(FERROR, "Unexpected local arg: %s\n", remote_argv[i]);
+ rprintf(FERROR, "If arg is a remote file/dir, prefix it with a colon (:).\n");
+ exit_cleanup(RERR_SYNTAX);
+ }
+ remote_argv[i]++;
+ }
+ if (argc == 0)
+ list_only |= 1;
+ }
+
+ if (daemon_over_rsh < 0)
+ return start_socket_client(shell_machine, remote_argc, remote_argv, argc, argv);
+
+ if (password_file && !daemon_over_rsh) {
+ rprintf(FERROR, "The --password-file option may only be "
+ "used when accessing an rsync daemon.\n");
+ exit_cleanup(RERR_SYNTAX);