Release bumped to "gts4".
[tac_plus.git] / db_null.c
index 40252d8..9892ef0 100644 (file)
--- a/db_null.c
+++ b/db_null.c
@@ -6,22 +6,30 @@
 **  DO_NOT_USE_THIS_FOR_WORK!
 */
 
-#if defined(DB_NULL) && defined(DB)
+
 #include "tac_plus.h"
 
+#if defined(DB_NULL) && defined(DB)
+
+#include "db_null.h"
+#include "report.h"
+#include "main.h"
+
+
+int null_db_verify TAC_ARGS((const char *user, const char *users_passwd, const char *db_user, const char *db_password, const char *db_hostname, const char *db_table, const char *dbfield_name, const char *dbfield_passwd));
+
 int null_db_verify(user, users_passwd, db_user, db_password, db_hostname,
            db_table, dbfield_name, dbfield_passwd)
-           
-char *user, *users_passwd;      /* Username and gived password   */
-char *db_user;                 /* db's parametr's               */
-char *db_password;
-char *db_hostname;
-char *db_table;
-char *dbfield_name;
-char *dbfield_passwd;
-
+const char *user;                      /* username ... */
+const char *users_passwd;              /* ... and given password */
+const char *db_user;                   /* db's parametr's */
+const char *db_password;
+const char *db_hostname;
+const char *db_table;
+const char *dbfield_name;
+const char *dbfield_passwd;
 {
-//report(LOG_DEBUG, "DB_NULL(%u) - ok", __LINE__);
+/*    report(LOG_DEBUG, "DB_NULL(%u) - ok", __LINE__); */
 
     /* Try to verify the password
        Successful if username and password equal */
@@ -36,22 +44,30 @@ char *dbfield_passwd;
 
 /*     Null Database Accounting        */
 
-int 
+int null_db_acct TAC_ARGS((const char *db_user, const char *db_password, const char *db_hostname, const char *db_name, const char *db_table, const char *s_name, const char *c_name, const char *a_username, const char *elapsed_time, const char *bytes_in, const char *bytes_out));
+
+int
 null_db_acct(db_user, db_password, db_hostname,db_name,db_table,s_name,c_name,a_username,elapsed_time,bytes_in,bytes_out)
-char *db_user;                 /* db's parametr's               */
-char *db_password;
-char *db_hostname;
-char *db_name;
-char *db_table;
-char *s_name;
-char *c_name;
-char *a_username;
-char *elapsed_time;char *bytes_in;char *bytes_out;
+const char *db_user;                   /* db's parametr's               */
+const char *db_password;
+const char *db_hostname;
+const char *db_name;
+const char *db_table;
+const char *s_name;
+const char *c_name;
+const char *a_username;
+const char *elapsed_time;
+const char *bytes_in;
+const char *bytes_out;
 {
-report(LOG_INFO,"Db accounting user=%s pass=%s host=%s 
-db_name=%s table=%s servern=%s clientn=%s username=%s et=%s bi=%s bo=%s",db_user,db_password,db_hostname,
-db_name,db_table,s_name,c_name,a_username,elapsed_time,bytes_in,bytes_out);
-return (1);
+    report(LOG_INFO,"Db accounting user=%s pass=%s host=%s \
+    db_name=%s table=%s servern=%s clientn=%s username=%s et=%s bi=%s bo=%s",db_user,db_password,db_hostname,
+    db_name,db_table,s_name,c_name,a_username,elapsed_time,bytes_in,bytes_out);
+    return (1);
 }
-#endif
 
+#else /* defined(DB_NULL) && defined(DB) */
+
+TAC_SOURCEFILE_EMPTY
+
+#endif /* defined(DB_NULL) && defined(DB) */