aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbUtils.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/dbUtils.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index 55791653f..3699ab72a 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -277,6 +277,17 @@ int sumSavedMemoryInDirectory(FILE * fp, Directory * dir, void * data) {
*sum += (strlen(dir->utf8name)+1-sizeof(Directory *))*
dir->songs->numberOfNodes;
+
+ /**sum += (strlen(dir->utf8name)+1)*
+ dir->subDirectories->numberOfNodes;*/
+
+ return 0;
+}
+
+int sumSavedMemoryInSong(FILE * fp, Song * song, void * data) {
+ int * sum = data;
+
+ *sum += strlen(song->url)+1;
return 0;
}
@@ -284,8 +295,8 @@ int sumSavedMemoryInDirectory(FILE * fp, Directory * dir, void * data) {
void printSavedMemoryFromFilenames() {
int sum;
- traverseAllIn(stderr, NULL, NULL, sumSavedMemoryInDirectory,
- (void *)&sum);
+ traverseAllIn(stderr, NULL, sumSavedMemoryInSong,
+ sumSavedMemoryInDirectory, (void *)&sum);
DEBUG("saved memory from filenames: %i\n", sum);
}