From 4eb416a3b3f957189e9bc06ce2c78fb042617a47 Mon Sep 17 00:00:00 2001 From: Craig Markwardt Date: Sun, 1 Jan 2012 23:51:34 -0500 Subject: [PATCH] Revert "Enable dynamic library updating" This reverts commit 732ec9239a59525d179beac35bad5f56c5db1ced. --- src/db.c | 19 ------------------- src/db.h | 2 -- src/httpd_daap.c | 6 ++++++ 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/src/db.c b/src/db.c index 4a682e75..57a93dea 100644 --- a/src/db.c +++ b/src/db.c @@ -268,15 +268,6 @@ static const char *sort_clause[] = static char *db_path; static __thread sqlite3 *hdl; -/* - * Starting database revision. A number of 2 ensures that remote clients - * always get a fresh update. (they start with 1) - */ -static int db_rev = 2; -/* Update the database revision number. Don't worry about multiple threads, - we don't care about an accurate count of the number of revisions, just - that revisions have occurred or not. */ -#define db_rev_increment() { db_rev ++; } /* Forward */ static int @@ -288,14 +279,6 @@ db_smartpl_count_items(const char *smartpl_query); struct playlist_info * db_pl_fetch_byid(int id); -/* - * db_revision_number - return current database revision number to external modules - */ -int -db_revision_number() -{ - return db_rev; -} char * db_escape_string(const char *str) @@ -2024,7 +2007,6 @@ db_file_add(struct media_file_info *mfi) } sqlite3_free(query); - db_rev_increment(); return 0; @@ -2099,7 +2081,6 @@ db_file_update(struct media_file_info *mfi) } sqlite3_free(query); - db_rev_increment(); return 0; diff --git a/src/db.h b/src/db.h index 87c1493f..b3468a3b 100644 --- a/src/db.h +++ b/src/db.h @@ -470,8 +470,6 @@ db_watch_enum_end(struct watch_enum *we); int db_watch_enum_fetchwd(struct watch_enum *we, uint32_t *wd); -int -db_revision_number(void); int db_perthread_init(void); diff --git a/src/httpd_daap.c b/src/httpd_daap.c index d3af6270..637c0b8f 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -65,6 +65,12 @@ extern struct event_base *evbase_httpd; /* How often we poll for database changes */ #define DAAP_UPDATE_MONITOR_TIMEOUT 10 +/* XXX Workaround before adding revision support in db.c; + Client will not get dynamic updates. The state of the + database at the time of connection is all the client + gets. */ +#define db_revision_number() (2) + struct uri_map { regex_t preg; char *regexp;