]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mmd: rename dbinfo to selector_info
authorAndre <maan@p133.(none)>
Fri, 10 Mar 2006 21:28:01 +0000 (22:28 +0100)
committerAndre <maan@p133.(none)>
Fri, 10 Mar 2006 21:28:01 +0000 (22:28 +0100)
afs.c
command.c
mysql_selector.c
playlist_selector.c
random_selector.c
server.h

diff --git a/afs.c b/afs.c
index 6c3df15ea814a45d11768cb81c508bf9d0316a72..a51db969f4853ea951549e9e5721e40aa397d5d0 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -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;
index 9d473019c009f20f5c6f1e4b517712c8a254d49f..ee165e88b923efda643fc54845790394741557ed 100644 (file)
--- a/command.c
+++ b/command.c
@@ -430,7 +430,7 @@ static char *get_status(struct misc_meta_data *nmmd)
 
                status_item_list[SI_OFFSET], offset,
                status_item_list[SI_FORMAT], audio_format_name(nmmd->audio_format),
-               nmmd->dbinfo,
+               nmmd->selector_info,
                nmmd->audio_file_info,
 
                status_item_list[SI_UPTIME], ut,
@@ -676,7 +676,6 @@ static int com_sb(int socket_fd, int argc, char **argv)
 /* stat */
 static int com_stat(int socket_fd, int argc, char **argv)
 {
-//     char *old_stat = NULL, *old_dbinfo = NULL;
        int ret, num = 0;/* status will be printed that many
                          * times. num <= 0 means: print forever
                          */
index 88e31f3c3544bbad382e8024e6060c6fbe3d5153..9f5a14f39854831faa238e8cb3d6363cb8d4f93d 100644 (file)
@@ -1807,8 +1807,8 @@ out:
 static void update_mmd(char *info)
 {
        PARA_DEBUG_LOG("%s", "updating shared memory area\n");
-       strncpy(mmd->dbinfo, info, MMD_INFO_SIZE - 1);
-       mmd->dbinfo[MMD_INFO_SIZE - 1] = '\0';
+       strncpy(mmd->selector_info, info, MMD_INFO_SIZE - 1);
+       mmd->selector_info[MMD_INFO_SIZE - 1] = '\0';
 }
 
 static void update_audio_file_server_handler(char *name)
@@ -2427,7 +2427,7 @@ static int init_mysql_server(void)
 /* mmd lock must be held */
 static void write_msg2mmd(int success)
 {
-       sprintf(mmd->dbinfo, "dbinfo1:%s\ndbinfo2:mysql-%s\ndbinfo3:\n",
+       sprintf(mmd->selector_info, "dbinfo1:%s\ndbinfo2:mysql-%s\ndbinfo3:\n",
                success < 0? PARA_STRERROR(-success) :
                        "successfully connected to mysql server",
                success < 0? "" : mysql_get_server_info(mysql_ptr));
@@ -2512,9 +2512,10 @@ static void shutdown_connection(void)
  * the init function of the mysql-based audio file selector
  *
  * Check the command line options and initialize all function pointers of \a db.
- * Connect to the mysql server and initialize the dbinfo string.
+ * Connect to the mysql server and initialize the info string.
  *
- * \sa struct audio_file_selector, misc_meta_data::dbinfo, random_selector.c
+ * \sa struct audio_file_selector, misc_meta_data::selector_info,
+ * random_selector.c
  */
 int mysql_selector_init(struct audio_file_selector *db)
 {
index f3f556cd6460bbe0af8b941b856fa1b325fc95be..346f1ce12a0e0b83eff76ddc51dead55475ca08d 100644 (file)
@@ -275,7 +275,7 @@ void pls_update_audio_file(char *audio_file)
  *
  * Init all function pointers of \a db
  *
- * \sa struct audio_file_selector, misc_meta_data::dbinfo, mysql.c
+ * \sa struct audio_file_selector, misc_meta_data::selector_info, mysql.c
  * random_selector.c.
  */
 int playlist_selector_init(struct audio_file_selector *db)
@@ -318,7 +318,7 @@ int playlist_selector_init(struct audio_file_selector *db)
                goto err_out;
        ppd->client_data = shm;
        ppd->client_data->size = 0;
-       sprintf(mmd->dbinfo, "playlist selector initialized");
+       sprintf(mmd->selector_info, "playlist selector initialized");
        return 1;
 err_out:
        if (ppd->client_data_shm_id >= 0)
index 37e9116bc24d9ea21e388b7b85576fdeae541525..0dca17279ce5fd8133081190ce72776bbb24f71d 100644 (file)
@@ -130,17 +130,17 @@ static void random_shutdown(void)
 /**
  *  the init function for the random audio file selector
  *
- * Init all function pointers of \a db, init the dbinfo text and seed the
+ * Init all function pointers of \a db, init the info text and seed the
  * PRNG.
  *
- * \sa struct audio_file_selector, misc_meta_data::dbinfo, mysql.c
+ * \sa struct audio_file_selector, misc_meta_data::selector_info, mysql.c
  */
 int random_selector_init(struct audio_file_selector *db)
 {
        struct timeval now;
 
        PARA_INFO_LOG("%s", "registering random handlers ;)\n");
-       sprintf(mmd->dbinfo, DBINFO);
+       sprintf(mmd->selector_info, DBINFO);
        gettimeofday(&now, NULL);
        srand(now.tv_usec);
        db->cmd_list = cmds;
index 1e4a75f83e514c5a5537a5850c4bdca5888f3323..da777f771d90386e2626183b6ba120e4bde49514 100644 (file)
--- a/server.h
+++ b/server.h
@@ -21,7 +21,7 @@
 #include "para.h"
 
 
-/** size of the dbinfo and audio_file info strings of struct misc_meta_data */
+/** size of the selector_info and audio_file info strings of struct misc_meta_data */
 #define MMD_INFO_SIZE 16384
 
 /**
@@ -140,7 +140,7 @@ struct misc_meta_data{
 /** the process id of para_server */
        pid_t server_pid;
 /** a string that gets filled in by the current audio file selector */
-       char dbinfo[MMD_INFO_SIZE];
+       char selector_info[MMD_INFO_SIZE];
 /** the number if the current database tool */
        int dbt_num;
 /** commands set this to non-zero to request a database tool change */