From: Wilfried Göesgens Date: Thu, 30 Oct 2008 19:23:10 +0000 (+0000) Subject: * fix pre-conditions; since we load & keep the config in the session, we don't need... X-Git-Tag: v7.86~1833 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=38624eb172f9a387f23c413aaba3865b0a1042e6 * fix pre-conditions; since we load & keep the config in the session, we don't need the context prerequisite here. Thanks to Samjam for reporting. --- diff --git a/webcit/inetconf.c b/webcit/inetconf.c index 92b76de22..b19fc242a 100644 --- a/webcit/inetconf.c +++ b/webcit/inetconf.c @@ -386,12 +386,12 @@ void InetCfgSubst(StrBuf *TemplBuffer, void *vContext, WCTemplateToken *Token) SVPutBuf("SERVCFG:INET:HOSTNAME", vContext, 1); } -void DeleteInectConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType) +void DeleteInetConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType) { struct wcsession *WCC = WC; - if (WCC->InetCfg == NULL) - load_inetconf(); - DeleteHash(&WCC->InetCfg); + + if (WCC->InetCfg != NULL) + DeleteHash(&WCC->InetCfg); } @@ -418,5 +418,5 @@ InitModule_INETCONF WebcitAddUrlHandler(HKEY("display_inetconf"), display_inetconf, 0); WebcitAddUrlHandler(HKEY("save_inetconf"), new_save_inetconf, AJAX); RegisterIterator("SERVCFG:INET", 1, NULL, GetInetConfHash, InetCfgSubst, NULL, CTX_INETCFG); - RegisterNamespace("SERVCFG:FLUSHINETCFG",0, 0, DeleteInectConfHash, CTX_INETCFG); + RegisterNamespace("SERVCFG:FLUSHINETCFG",0, 0, DeleteInetConfHash, CTX_NONE); }