From 6e166433ef87e8c1e7778d1c497729d92206b04c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Sep 2009 17:40:25 +0200 Subject: [PATCH] mpdclient: renamed "updatingdb" to "update_id" Adopt libmpdclient's name. --- src/mpdclient.c | 6 +++--- src/mpdclient.h | 2 +- src/screen_client.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mpdclient.c b/src/mpdclient.c index b8d9c6f..e331544 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -230,11 +230,11 @@ mpdclient_update(struct mpdclient *c) if (c->status == NULL) return mpdclient_handle_error(c) == 0; - if (c->updatingdb && - c->updatingdb != mpd_status_get_update_id(c->status)) + if (c->update_id > 0 && + c->update_id != mpd_status_get_update_id(c->status)) mpdclient_browse_callback(c, BROWSE_DB_UPDATED, NULL); - c->updatingdb = mpd_status_get_update_id(c->status); + c->update_id = mpd_status_get_update_id(c->status); c->volume = mpd_status_get_volume(c->status); /* check if the playlist needs an update */ diff --git a/src/mpdclient.h b/src/mpdclient.h index 2679a62..39575b8 100644 --- a/src/mpdclient.h +++ b/src/mpdclient.h @@ -21,7 +21,7 @@ struct mpdclient { const struct mpd_song *song; int volume; - unsigned updatingdb; + unsigned update_id; }; /** functions ***************************************************************/ diff --git a/src/screen_client.c b/src/screen_client.c index 3916304..f94ada1 100644 --- a/src/screen_client.c +++ b/src/screen_client.c @@ -75,9 +75,9 @@ screen_database_update(struct mpdclient *c, const char *path) return; } - /* set updatingDb to make sure the browse callback gets called + /* set update_id to make sure the browse callback gets called even if the update has finished before status is updated */ - c->updatingdb = id; + c->update_id = id; if (path != NULL && *path != 0) { char *path_locale = utf8_to_locale(path); -- 2.30.2