diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-04-15 08:36:13 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-04-15 09:15:45 +0300 |
commit | 6398c8db62d953b80fa83093a2e05f41b782f662 (patch) | |
tree | 776bc57a9e9459c52b910a3a0caa3c09b77f4c23 /tests | |
parent | 5b272a2b955eb426bcb6abe5be6ca4c87705f49e (diff) | |
download | wydawca-6398c8db62d953b80fa83093a2e05f41b782f662.tar.gz wydawca-6398c8db62d953b80fa83093a2e05f41b782f662.tar.bz2 |
When processing spool requests, handle each completed triplet in spool.
Previously wydawca used to take optional second parameter - a list of
submitter UIDs. If given this list, it would process only those triplets
that had been uploaded by one of these UIDs. This proved to be
unnecessary.
The same change is applied to the notification protocol. Only the spool
name is required. The second word in the request (user name) is now
silently ignored.
* src/wydawca.h (struct wy_triplet): Remove const qualifier from the
spool member. Remove jq_prev and jq_next pointers.
(struct job_spool_id): Remove.
(job_schedule_spool): Change signature.
* src/job.c (struct job): Replace job_spool with a pointer to
spool.
(triplet_jq_unlink,jq_clear): Remove.
(job_printable): Change formatting of JOB_SPOOL jobs.
(job_locate): Update.
(wydawca_scanner): Update.
* src/net.c (handle_connection): Ignore second word in the request.
* src/process.c (spool_add_new_file): Change signature. UIDs are
no longer needed.
Return a pointer to the affected triplet.
(scan_spool): Change signature.
* src/triplet.c (register_file): Return pointer to the affected triplet.
(check_triplet_state): Remove the noauth parameter.
(triplet_enqueue): New function.
(triplet_commit): New function.
(spool_commit_triplets): Remove the tplist parameter. Process all
complete triplets in the spool.
(link_processable_triplets): Remove.
* src/verify.c (verify_directive_file): Remove the noauth parameter.
* src/watcher.c (process_event): Enqueue created triplets.
* src/wydawca.c (main): Don't take any UID arguments.
* tests/inotify-ok.at: The version statement is printed once. Update
the expected output.
* tests/inotify-rmsymlink.at: Likewise.
* tests/inotify-symlink.at: Likewise.
* tests/inotify-unatt01.at: Likewise.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/inotify-ok.at | 1 | ||||
-rw-r--r-- | tests/inotify-rmsymlink.at | 1 | ||||
-rw-r--r-- | tests/inotify-symlink.at | 1 | ||||
-rw-r--r-- | tests/inotify-unatt01.at | 1 |
4 files changed, 0 insertions, 4 deletions
diff --git a/tests/inotify-ok.at b/tests/inotify-ok.at index 6f50abb..5593225 100644 --- a/tests/inotify-ok.at +++ b/tests/inotify-ok.at @@ -20,7 +20,6 @@ AT_KEYWORDS([uploads check-test check-success check-ok inotify inotify-ok]) AT_DATA([experr], [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started wydawca: [[NOTICE]] file.directive.asc: VERSION: 1.1 -wydawca: [[NOTICE]] file.directive.asc: VERSION: 1.1 wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite wydawca: [[INFO]] errors: 0 wydawca: [[INFO]] warnings: 0 diff --git a/tests/inotify-rmsymlink.at b/tests/inotify-rmsymlink.at index 7c45b46..fa806ac 100644 --- a/tests/inotify-rmsymlink.at +++ b/tests/inotify-rmsymlink.at @@ -20,7 +20,6 @@ AT_KEYWORDS([inotify rmsymlink inotify-rmsymlink]) AT_DATA([experr], [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started wydawca: [[NOTICE]] rmsymlink.directive.asc: VERSION: 1.2 -wydawca: [[NOTICE]] rmsymlink.directive.asc: VERSION: 1.2 wydawca: [[NOTICE]] rmsymlink.directive.asc: COMMENT: remove symlink wydawca: [[INFO]] errors: 0 wydawca: [[INFO]] warnings: 0 diff --git a/tests/inotify-symlink.at b/tests/inotify-symlink.at index f666a59..409804b 100644 --- a/tests/inotify-symlink.at +++ b/tests/inotify-symlink.at @@ -20,7 +20,6 @@ AT_KEYWORDS([inotify symlink inotify-symlink]) AT_DATA([experr], [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started wydawca: [[NOTICE]] symlink.directive.asc: VERSION: 1.2 -wydawca: [[NOTICE]] symlink.directive.asc: VERSION: 1.2 wydawca: [[NOTICE]] symlink.directive.asc: COMMENT: create a symlink wydawca: [[INFO]] errors: 0 wydawca: [[INFO]] warnings: 0 diff --git a/tests/inotify-unatt01.at b/tests/inotify-unatt01.at index e15ebf4..75b14c4 100644 --- a/tests/inotify-unatt01.at +++ b/tests/inotify-unatt01.at @@ -34,7 +34,6 @@ wydawca: [[INFO]] symlinks created: 0 wydawca: [[INFO]] symlinks removed: 0 wydawca: [[INFO]] check failures: 0 wydawca: [[NOTICE]] file.directive.asc: VERSION: 1.1 -wydawca: [[NOTICE]] file.directive.asc: VERSION: 1.1 wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite wydawca: [[INFO]] errors: 0 wydawca: [[INFO]] warnings: 0 |