Obtain afs status items directly from afs.
[paraslash.git] / mood.c
diff --git a/mood.c b/mood.c
index 540d0c7..32a10e5 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -7,6 +7,7 @@
 /** \file mood.c Paraslash's mood handling functions. */
 
 #include <fnmatch.h>
 /** \file mood.c Paraslash's mood handling functions. */
 
 #include <fnmatch.h>
+#include <osl.h>
 #include "para.h"
 #include "error.h"
 #include "string.h"
 #include "para.h"
 #include "error.h"
 #include "string.h"
@@ -266,7 +267,6 @@ static int add_item_score(const struct osl_row *row, struct mood_item *item, lon
                ret = get_afhi_of_row(row, &afhi);
                if (ret< 0)
                        return ret;
                ret = get_afhi_of_row(row, &afhi);
                if (ret< 0)
                        return ret;
-               free(afhi.info_string); /* don't need the tag info */
                ret = get_audio_file_path_of_row(row, &path);
                if (ret< 0)
                        return ret;
                ret = get_audio_file_path_of_row(row, &path);
                if (ret< 0)
                        return ret;
@@ -972,7 +972,7 @@ int change_current_mood(char *mood_name)
                        .data = mood_name,
                        .size = strlen(mood_name) + 1
                };
                        .data = mood_name,
                        .size = strlen(mood_name) + 1
                };
-               ret = osl_get_row(moods_table, BLOBCOL_NAME, &obj, &row);
+               ret = osl(osl_get_row(moods_table, BLOBCOL_NAME, &obj, &row));
                if (ret < 0) {
                        PARA_NOTICE_LOG("no such mood: %s\n", mood_name);
                        return ret;
                if (ret < 0) {
                        PARA_NOTICE_LOG("no such mood: %s\n", mood_name);
                        return ret;