update audiod help text
[paraslash.git] / afs.c
diff --git a/afs.c b/afs.c
index cb6c3882266876d240ddaaf1fb857d7cda75dbeb..a73b18e0596427dd2c24a31c4668d42c708ce572 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -18,8 +18,8 @@
 
 /** \file afs.c audio file sending functions
  *
- * This contains the audio sending part of para_server which is independent
- * of the current audio format, database tool and of the activated senders.
+ * This contains the audio sending part of para_server which is independent of
+ * the current audio format, audio file selector and of the activated senders.
  */
 
 #include <sys/time.h> /* gettimeofday */
@@ -38,7 +38,7 @@ static struct timeval data_send_barrier;
 static struct timeval eof_barrier;
 
 extern struct misc_meta_data *mmd;
-extern struct dbtool dblist[];
+extern struct audio_file_selector dblist[];
 extern struct sender senders[];
 extern struct gengetopt_args_info conf;
 
@@ -233,7 +233,7 @@ static int update_mmd(void)
 
 static void get_song(void)
 {
-       char **sl = dblist[mmd->dbt_num].get_audio_file_list(10);
+       char **sl = dblist[mmd->selector_num].get_audio_file_list(10);
        int i;
 
        if (!sl)
@@ -253,8 +253,8 @@ static void get_song(void)
                        continue;
                }
                mmd->num_played++;
-               if (dblist[mmd->dbt_num].update_audio_file)
-                       dblist[mmd->dbt_num].update_audio_file(sl[i]);
+               if (dblist[mmd->selector_num].update_audio_file)
+                       dblist[mmd->selector_num].update_audio_file(sl[i]);
                PARA_DEBUG_LOG("%s", "success\n");
                mmd->new_afs_status_flags &= (~AFS_NEXT);
                gettimeofday(&now, NULL);
@@ -353,7 +353,7 @@ static void afs_eof(struct audio_format *af)
        free(tmp);
        tmp  = make_message("%s:\n%s:\n%s:\n", status_item_list[SI_DBINFO1],
                status_item_list[SI_DBINFO2], status_item_list[SI_DBINFO3]);
-       strcpy(mmd->dbinfo, tmp);
+       strcpy(mmd->selector_info, tmp);
        free(tmp);
        mmd->filename[0] = '\0';
        mmd->size = 0;
@@ -454,7 +454,7 @@ void afs_send_chunk(void)
        if (tv_diff(&due, &now, NULL) > 0)
                return;
        buf = af->read_chunk(mmd->current_chunk, &ret);
-       mmd->new_afs_status_flags &= ~(AFS_NEXT | AFS_REPOS);
+       mmd->new_afs_status_flags &= ~AFS_REPOS;
        if (!buf) {
                if (ret < 0)
                        mmd->new_afs_status_flags = AFS_NEXT;