diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 11:07:55 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:48 -0700 |
commit | 4629f646077109f7c6185aab92560da52c237412 (patch) | |
tree | af62c1fd2d29c53d137f8b390682492bf0ef102d /src/update.c | |
parent | 0576b8abf8b2fd25105f6e0190a93ddec298e9fb (diff) | |
download | mpd-4629f646077109f7c6185aab92560da52c237412.tar.gz mpd-4629f646077109f7c6185aab92560da52c237412.tar.xz mpd-4629f646077109f7c6185aab92560da52c237412.zip |
database: renamed functions, "db_" prefix and no CamelCase
Yet another CamelCase removal patch.
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/update.c b/src/update.c index 8560dde38..52e61167d 100644 --- a/src/update.c +++ b/src/update.c @@ -312,7 +312,7 @@ static struct directory * addDirectoryPathToDB(const char *utf8path) parent = parent_path(path_max_tmp, utf8path); if (strlen(parent) == 0) - parentDirectory = directory_get_root(); + parentDirectory = db_get_root(); else parentDirectory = addDirectoryPathToDB(parent); @@ -351,7 +351,7 @@ static struct directory * addParentPathToDB(const char *utf8path) parent = parent_path(path_max_tmp, utf8path); if (strlen(parent) == 0) - parentDirectory = directory_get_root(); + parentDirectory = db_get_root(); else parentDirectory = addDirectoryPathToDB(parent); @@ -373,7 +373,7 @@ static enum update_return updatePath(const char *utf8path) assert(utf8path); /* if path is in the DB try to update it, or else delete it */ - if ((directory = getDirectory(utf8path))) { + if ((directory = db_get_directory(utf8path))) { parentDirectory = directory->parent; /* if this update directory is successfull, we are done */ @@ -382,7 +382,7 @@ static enum update_return updatePath(const char *utf8path) return ret; } /* we don't want to delete the root directory */ - else if (directory == directory_get_root()) { + else if (directory == db_get_root()) { return UPDATE_RETURN_NOUPDATE; } /* if updateDirectory fails, means we should delete it */ @@ -392,7 +392,7 @@ static enum update_return updatePath(const char *utf8path) ret = UPDATE_RETURN_UPDATED; /* don't return, path maybe a song now */ } - } else if ((song = getSongFromDB(utf8path))) { + } else if ((song = db_get_song(utf8path))) { parentDirectory = song->parent; if (!parentDirectory->stat && statDirectory(parentDirectory) < 0) { @@ -448,10 +448,10 @@ static void * update_task(void *_path) ret = updatePath((char *)_path); free(_path); } else { - ret = updateDirectory(directory_get_root()); + ret = updateDirectory(db_get_root()); } - if (ret == UPDATE_RETURN_UPDATED && writeDirectoryDB() < 0) + if (ret == UPDATE_RETURN_UPDATED && db_save() < 0) ret = UPDATE_RETURN_ERROR; progress = UPDATE_PROGRESS_DONE; wakeup_main_task(); |