From 640bd05c085a496ea2933e9b01bca9e339f5d47a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 22 May 2007 21:02:28 +0000 Subject: [PATCH] Add db interface comments git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4882 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/dird.c | 8 ++++++++ bacula/src/lib/crypto.c | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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; -- 2.39.5