X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Finclude%2Fctdl_module.h;h=3eda4a8337de2f498eba7e00c28e335b53f85f61;hb=e8123a34d5c13c89443de540f8d3ef10f53225a6;hp=7005c1c38a8df3368b7c2a1032cabaed093b8883;hpb=5ec417e35ec1eb0b1b0ed055157177d9a2163d61;p=citadel.git diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index 7005c1c38..3eda4a833 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -376,51 +376,23 @@ struct config { int c_nntp_port; int c_nntps_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; -}; -#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); @@ -515,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,