]> git.sur5r.net Git - bacula/bacula/commitdiff
Add db interface comments
authorKern Sibbald <kern@sibbald.com>
Tue, 22 May 2007 21:02:28 +0000 (21:02 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 22 May 2007 21:02:28 +0000 (21:02 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4882 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/dird.c
bacula/src/lib/crypto.c

index 9cdab0fb86320ba800712c806228b2cf89f74837..64e94d82abb492399ee269a494fb396598727848 100644 (file)
@@ -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) {
index fb231d8a146591d539f630961719b78a5cfb29e6..b4db253e16a5711b2f80e764466033c102ee9fac 100644 (file)
@@ -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;