FILE *con_fd = NULL; /* Console file descriptor */
brwlock_t con_lock; /* Console lock structure */
-
-#if defined(HAVE_POSTGRESQL)
-char catalog_db[] = "PostgreSQL";
-#elif defined(HAVE_MYSQL)
-char catalog_db[] = "MySQL";
-#elif defined(HAVE_SQLITE)
-char catalog_db[] = "SQLite";
-#else
-char catalog_db[] = "Internal";
-#endif
+static char *catalog_db = NULL; /* database type */
const char *host_os = HOST_OS;
const char *distname = DISTNAME;
}
}
+const char *
+get_db_type(void)
+{
+ return catalog_db != NULL ? catalog_db : "unknown";
+}
+
+void
+set_db_type(const char *name)
+{
+ if (catalog_db != NULL)
+ {
+ free(catalog_db);
+ }
+
+ catalog_db = bstrdup(name);
+}
+
/*
* Initialize message handler for a daemon or a Job
* We make a copy of the MSGS resource passed, so it belows
Jmsg(jcr, item->type, item->mtime, "%s", item->msg);
}
jcr->msg_queue->destroy();
- jcr->msg_queue = NULL;
jcr->dequeuing = false;
bail_out: