aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-12-29 19:53:24 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2012-12-29 19:53:24 +0200
commita7278cd9133596c3adbad2fc03571ce8bea18272 (patch)
tree52bf5bfb1e7c79cbf27427e45ed95902147ce2fe
parent03d27824f4cdb403de79e9ecc82037df037723db (diff)
downloadwydawca-a7278cd9133596c3adbad2fc03571ce8bea18272.tar.gz
wydawca-a7278cd9133596c3adbad2fc03571ce8bea18272.tar.bz2
Remove unnecessary virtual function.
The source_dir of a spool always refers to a directory on a file system, so the get_path method is unnecessary and is removed.
-rw-r--r--NEWS3
-rw-r--r--src/vtab.c14
-rw-r--r--src/watcher.c2
-rw-r--r--src/wydawca.h3
4 files changed, 6 insertions, 16 deletions
diff --git a/NEWS b/NEWS
index 804a61e..f28ec2a 100644
--- a/NEWS
+++ b/NEWS
@@ -16,3 +16,4 @@ Version 2.1.90 (Git)
The use of inotify allows wydawca to act immediately upon finished
-uploads without the need of external notifications.
+uploads without the need of external notifications. This makes the
+TCP-based notification unnecessary on GNU/Linux systems.
diff --git a/src/vtab.c b/src/vtab.c
index cec6fc0..e05b964 100644
--- a/src/vtab.c
+++ b/src/vtab.c
@@ -26,9 +26,9 @@ static struct virt_tab_reg reg[] = {
{ "file",
- { dir_get_path, dir_test_url, dir_move_file, dir_archive_file,
+ { dir_test_url, dir_move_file, dir_archive_file,
dir_symlink_file, dir_rmsymlink_file } },
{ "dir",
- { dir_get_path, dir_test_url, dir_move_file, dir_archive_file,
+ { dir_test_url, dir_move_file, dir_archive_file,
dir_symlink_file, dir_rmsymlink_file } },
{ "null",
- { NULL, NULL, null_move_file, null_archive_file, null_symlink_file,
+ { NULL, null_move_file, null_archive_file, null_symlink_file,
null_rmsymlink_file } },
@@ -55,10 +55,2 @@ url_to_vtab (mu_url_t url, struct virt_tab *vtab)
-const char *
-get_path (struct spool *sp)
-{
- if (!sp->vtab.get_path)
- return NULL;
- return sp->vtab.get_path (sp);
-}
-
int
diff --git a/src/watcher.c b/src/watcher.c
index 1c67294..f6245db 100644
--- a/src/watcher.c
+++ b/src/watcher.c
@@ -81,3 +81,3 @@ create_watcher (struct spool *sp, void *data)
int wd;
- const char *path = get_path (sp);
+ const char *path = sp->source_dir;
diff --git a/src/wydawca.h b/src/wydawca.h
index 4021a56..25153c2 100644
--- a/src/wydawca.h
+++ b/src/wydawca.h
@@ -208,3 +208,2 @@ struct virt_tab
{
- const char *(*get_path) (struct spool *sp);
int (*test_url) (mu_url_t url, grecs_locus_t *loc);
@@ -510,3 +509,2 @@ int url_to_vtab (mu_url_t url, struct virt_tab *vtab);
-const char *get_path (struct spool *sp);
int move_file (struct file_triplet *trp, enum file_type file_id);
@@ -522,3 +520,2 @@ int copy_file (const char *file, const char *dst_file);
-const char *dir_get_path (struct spool *sp);
int dir_test_url (mu_url_t url, grecs_locus_t *locus);

Return to:

Send suggestions and report system problems to the System administrator.