added two new options "max connections" and "lock file"
[rsync.git] / clientserver.c
index 32deee7633ef67107121c43dbc9a99217c5f98e3..18d9494ee1da94843911f491d1bc0e02c8fd0c28 100644 (file)
@@ -108,6 +108,11 @@ static int rsync_module(int fd, int i)
                return -1;
        }
 
+       if (!claim_connection(lp_lock_file(), lp_max_connections())) {
+               rprintf(FERROR,"ERROR: max connections reached\n");
+               return -1;
+       }
+
        rprintf(FINFO,"rsync on module %s from %s (%s)\n",
                lp_name(i), host, addr);