Changed rprintf() calls that included strerror() to use rsyserr().
[rsync/rsync.git] / clientserver.c
index 13e52f3..a1e15c0 100644 (file)
@@ -47,7 +47,7 @@ extern int orig_umask;
 extern int no_detach;
 extern int default_af_hint;
 extern char *bind_address;
-extern struct exclude_struct **server_exclude_list;
+extern struct exclude_list_struct server_exclude_list;
 extern char *exclude_path_prefix;
 extern char *config_file;
 
@@ -87,18 +87,10 @@ int start_socket_client(char *host, char *path, int argc, char *argv[])
                *p = 0;
        }
 
-       if (verbose >= 2) {
-               /* FIXME: If we're going to use a socket program for
-                * testing, then this message is wrong.  We need to
-                * say something like "(except really using %s)" */
-               rprintf(FINFO, "opening tcp connection to %s port %d\n",
-                       host, rsync_port);
-       }
        fd = open_socket_out_wrapped(host, rsync_port, bind_address,
                                     default_af_hint);
-       if (fd == -1) {
+       if (fd == -1)
                exit_cleanup(RERR_SOCKETIO);
-       }
 
        ret = start_inband_exchange(user, path, fd, fd, argc);
 
@@ -241,10 +233,10 @@ static int rsync_module(int f_in, int f_out, int i)
 
        if (!claim_connection(lp_lock_file(i), lp_max_connections(i))) {
                if (errno) {
-                       rprintf(FERROR,"failed to open lock file %s : %s\n",
-                               lp_lock_file(i), strerror(errno));
-                       io_printf(f_out, "@ERROR: failed to open lock file %s : %s\n",
-                                 lp_lock_file(i), strerror(errno));
+                       rsyserr(FERROR, errno, "failed to open lock file %s",
+                               lp_lock_file(i));
+                       io_printf(f_out, "@ERROR: failed to open lock file %s\n",
+                                 lp_lock_file(i));
                } else {
                        rprintf(FERROR,"max connections (%d) reached\n",
                                lp_max_connections(i));