+- /* rsync:// always uses rsync server over direct socket connection */
+- if (strncasecmp(URL_PREFIX, argv[0], strlen(URL_PREFIX)) == 0
+- && !read_batch) {
+- char *host, *path;
++ if (!read_batch) { /* for read_batch, NO source is specified */
++ int url_prefix_len = sizeof URL_PREFIX - 1;
+
+- host = argv[0] + strlen(URL_PREFIX);
+- p = strchr(host,'/');
+- if (p) {
+- *p = '\0';
+- path = p+1;
+- } else
+- path = "";
+- if (*host == '[' && (p = strchr(host, ']')) != NULL) {
+- host++;
+- *p++ = '\0';
+- if (*p != ':')
+- p = NULL;
+- } else
+- p = strchr(host, ':');
+- if (p) {
+- rsync_port = atoi(p+1);
+- *p = '\0';
++ /* rsync:// always uses rsync server over direct socket connection */
++ if (strncasecmp(URL_PREFIX, argv[0], url_prefix_len) != 0) {