ctdluid is now specified on the command line with the new -u option. Config file...
[citadel.git] / citadel / include / ctdl_module.h
index 7a8b5250da83f64edd1d8e1f535bd422a002be4e..3eda4a8337de2f498eba7e00c28e335b53f85f61 100644 (file)
 #include <errno.h>
 #include <syslog.h>
 #include <sys/types.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
+#include <time.h>
 #include <sys/wait.h>
 #include <string.h>
 #ifdef HAVE_STRINGS_H
@@ -384,52 +373,26 @@ struct config {
        time_t c_pop3_fastest;
        int c_spam_flag_only;
        int c_guest_logins;
-};
-struct configlen {
-       long c_nodename;
-       long c_fqdn;
-       long c_humannode;
-       long c_phonenum;
-       long c_twitroom;
-       long c_moreprompt;
-       long c_site_location;
-       long c_sysadm;
-       long c_niu_2;
-       long c_ip_addr;
-       long c_logpages;
-       long c_baseroom;
-       long c_aideroom;
-       long c_ldap_host;
-       long c_ldap_base_dn;
-       long c_ldap_bind_dn;
-       long c_ldap_bind_pw;
-       long c_journal_dest;
-       long c_default_cal_zone;
-       long c_funambol_host;
-       long c_funambol_source;
-       long c_funambol_auth;
-       long c_master_user;
-       long c_master_pass;
-       long c_pager_program;
+       int c_nntp_port;
+       int c_nntps_port;
 };
 
-#define SET_CFGSTRBUF(which, buffer) configlen.which = safestrncpy(config.which, ChrPtr(buffer), sizeof(config.which))
-#define SET_CFGSTR(which, buffer) configlen.which = safestrncpy(config.which, buffer, sizeof(config.which))
+#define SET_CFGSTRBUF(which, buffer) safestrncpy(config.which, ChrPtr(buffer), sizeof(config.which))
+#define SET_CFGSTR(which, buffer) safestrncpy(config.which, buffer, sizeof(config.which))
 
 extern struct config config;
-extern struct configlen configlen;
 
 
 #define NODENAME               config.c_nodename
 #define FQDN                   config.c_fqdn
-#define CTDLUID                        config.c_ctdluid
+#define CTDLUID                        ctdluid
 #define CREATAIDE              config.c_creataide
 #define REGISCALL              config.c_regiscall
 #define TWITDETECT             config.c_twitdetect
 #define TWITROOM               config.c_twitroom
 #define RESTRICT_INTERNET      config.c_restrict
 
-#define CFG_KEY(which) config.which, configlen.which
+#define CFG_KEY(which) config.which, strlen(config.which)
 
 typedef void (*CfgLineParser)(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *rncfg);
 typedef void (*CfgLineSerializer)(const CfgLineType *ThisOne, StrBuf *OuptputBuffer, OneRoomNetCfg *rncfg, RoomNetCfgLine *data);
@@ -524,6 +487,10 @@ int CtdlGetUserLen(struct ctdluser *usbuf, const char *name, long len);
 int CtdlGetUserLock(struct ctdluser *usbuf, char *name);
 void CtdlPutUser(struct ctdluser *usbuf);
 void CtdlPutUserLock(struct ctdluser *usbuf);
+
+int CtdlLockGetCurrentUser(void);
+void CtdlPutCurrentUserLock(void);
+
 int CtdlGetUserByNumber(struct ctdluser *usbuf, long number);
 void CtdlGetRelationship(visit *vbuf,
                         struct ctdluser *rel_user,