From: Kern Sibbald Date: Tue, 22 May 2007 21:02:28 +0000 (+0000) Subject: Add db interface comments X-Git-Tag: Release-2.2.0~412 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=486f68c5e820a31500639ec3b44518ddd075b5bb;p=bacula%2Fbacula Add db interface comments git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4882 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index 9cdab0fb86..64e94d82ab 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -295,6 +295,14 @@ int main (int argc, char *argv[]) return 0; } +/* + * This allows the message handler to operate on the database + * by using a pointer to this function. The pointer is + * needed because the other daemons do not have access + * to the database. If the pointer is + * not defined (other daemons), then writing the database + * is disabled. + */ static void dir_sql_query(JCR *jcr, const char *cmd) { if (!jcr || !jcr->db) { diff --git a/bacula/src/lib/crypto.c b/bacula/src/lib/crypto.c index fb231d8a14..b4db253e16 100644 --- a/bacula/src/lib/crypto.c +++ b/bacula/src/lib/crypto.c @@ -1597,7 +1597,8 @@ int crypto_default_pem_callback(char *buf, int size, const void *userdata) * Returns the ASCII name of the digest type. * Returns: ASCII name of digest type. */ -const char *crypto_digest_name (DIGEST *digest) { +const char *crypto_digest_name(DIGEST *digest) +{ switch (digest->type) { case CRYPTO_DIGEST_MD5: return "MD5"; @@ -1619,7 +1620,8 @@ const char *crypto_digest_name (DIGEST *digest) { * Given a stream type, returns the associated * crypto_digest_t value. */ -crypto_digest_t crypto_digest_stream_type (int stream) { +crypto_digest_t crypto_digest_stream_type(int stream) +{ switch (stream) { case STREAM_MD5_DIGEST: return CRYPTO_DIGEST_MD5;