summaryrefslogtreecommitdiffabout
path: root/cvs/sv_sync_www.c
Side-by-side diff
Diffstat (limited to 'cvs/sv_sync_www.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cvs/sv_sync_www.c48
1 files changed, 3 insertions, 45 deletions
diff --git a/cvs/sv_sync_www.c b/cvs/sv_sync_www.c
index 7af1271..a251269 100644
--- a/cvs/sv_sync_www.c
+++ b/cvs/sv_sync_www.c
@@ -578,57 +578,15 @@ schedule_job (uid_t uid, gid_t gid, const char *file,
/* Multi-job support */
-static int
-dir_cmp (const char *a, const char *b)
-{
- if (!a)
- {
- if (b)
- return -1;
- else
- return 0;
- }
- else if (!b)
- return 1;
- return strcmp (a, b);
-}
-
-static int
-ent_cmp (const void *a, const void *b)
-{
- const struct sync_entry *sa = a;
- const struct sync_entry *sb = b;
- int rc;
-
- rc = strcmp (sa->repo, sb->repo);
- if (rc)
- return rc;
- rc = dir_cmp (sa->dir, sb->dir);
- if (rc)
- return rc;
- return sa->files - sb->files;
-}
-
int
do_sync (struct sync_entry *array, size_t count)
{
int rc = 0;
- struct sync_entry *sp, *lastp = NULL;
+ struct sync_entry *sp;
- /* Sort the array */
- qsort (array, count, sizeof array[0], ent_cmp);
-
for (sp = array; sp < array + count; sp++)
- {
- if (lastp)
- {
- if (strcmp (lastp->repo, sp->repo) == 0
- && dir_cmp (lastp->dir, sp->dir) == 0)
- continue;
- }
- rc |= sync_www (sp->repo, sp->dir, sp->files);
- lastp = sp;
- }
+ rc |= sync_www (sp->repo, sp->dir, sp->files);
+
if (debug)
fprintf (stderr, "do_sync: returning %d\n",rc);
return rc;

Return to:

Send suggestions and report system problems to the System administrator.