]> code.citadel.org Git - citadel.git/blobdiff - citadel/include/ctdl_module.h
Removed the whole configlen thing. Seriously, WTF?
[citadel.git] / citadel / include / ctdl_module.h
index 36c48bbf3657dd8613ae1fc2ab525f880e7c1e53..5ea37bfe57be087cf445a513766bfc1000295102 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
@@ -385,40 +374,13 @@ struct config {
        int c_spam_flag_only;
        int c_guest_logins;
        int c_nntp_port;
-};
-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_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
@@ -430,7 +392,7 @@ extern struct configlen configlen;
 #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);
@@ -525,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,