]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - server.c
rename dopey to random
[paraslash.git] / server.c
index 71ee9eb6321b7b34e9c61b0a9bd9389aa391f65f..044792f13c40807477cd984501deab4d0d0611e2 100644 (file)
--- a/server.c
+++ b/server.c
@@ -63,8 +63,8 @@ extern struct audio_format afl[];
 /** the list of supported database tools */
 struct dbtool dblist[] = {
        {
-               .name = "dopey",
-               .init = dopey_dbtool_init,
+               .name = "random",
+               .init = random_dbtool_init,
                .update_audio_file = NULL,
        },
 #ifdef HAVE_MYSQL
@@ -302,7 +302,7 @@ static void init_dbtool(void)
 
        mmd->dbt_change = -1; /* no change nec., set to new dbt num by com_cdt */
        if (!dblist[1].name)
-               goto dopey;
+               goto random;
        if (conf.dbtool_given) {
                for (i = 0; dblist[i].name; i++) {
                        if (strcmp(dblist[i].name, conf.dbtool_arg))
@@ -312,16 +312,16 @@ static void init_dbtool(void)
                        if (dblist[i].init(&dblist[i]) < 0) {
                                PARA_WARNING_LOG("init %s failed",
                                        dblist[i].name);
-                               goto dopey;
+                               goto random;
                        }
                        mmd->dbt_num = i;
                        return;
                }
-               PARA_WARNING_LOG("%s", "no such dbtool, switching to dopey\n");
-               goto dopey;
+               PARA_WARNING_LOG("%s", "no such dbtool, switching to random\n");
+               goto random;
        }
        /* use the first dbtool that works
-        * (assuming that dopey always works)
+        * (assuming that random always works)
         */
        for (i = 1; dblist[i].name; i++) {
                int ret = dblist[i].init(&dblist[i]);
@@ -333,7 +333,7 @@ static void init_dbtool(void)
                PARA_CRIT_LOG("%s init failed: %s\n", dblist[i].name,
                        PARA_STRERROR(-ret));
        }
-dopey:
+random:
        mmd->dbt_num = 0;
        dblist[0].init(&dblist[0]); /* always successful */
 }
@@ -417,7 +417,7 @@ static void handle_dbt_change(void)
                return;
        }
        /* init failed */
-       PARA_ERROR_LOG("%s -- switching to dopey\n", PARA_STRERROR(-ret));
+       PARA_ERROR_LOG("%s -- switching to the random dbtool\n", PARA_STRERROR(-ret));
        dblist[0].init(&dblist[0]);
        mmd->dbt_num = 0;
 }