From d4d8a13594b84a4a051066cd6c9856d194f63783 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 13 Jun 2017 23:06:13 -0400 Subject: [PATCH] text client <.A>ide ysconfig nternet , when encountering a "directory" domain, substitutes "localhost" --- citadel/modules/inetcfg/serv_inetcfg.c | 4 ++-- textclient/src/tuiconfig.c | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/citadel/modules/inetcfg/serv_inetcfg.c b/citadel/modules/inetcfg/serv_inetcfg.c index 990302f92..c0ddb3566 100644 --- a/citadel/modules/inetcfg/serv_inetcfg.c +++ b/citadel/modules/inetcfg/serv_inetcfg.c @@ -135,7 +135,7 @@ void inetcfg_init(void) { /*****************************************************************************/ /* MODULE INITIALIZATION STUFF */ /*****************************************************************************/ -void clenaup_inetcfg(void) +void cleanup_inetcfg(void) { char *buf; buf = inetcfg; @@ -152,7 +152,7 @@ CTDL_MODULE_INIT(inetcfg) { CtdlRegisterMessageHook(inetcfg_aftersave, EVT_AFTERSAVE); inetcfg_init(); - CtdlRegisterCleanupHook(clenaup_inetcfg); + CtdlRegisterCleanupHook(cleanup_inetcfg); } /* return our module name for the log */ diff --git a/textclient/src/tuiconfig.c b/textclient/src/tuiconfig.c index 85649c76b..d89ab9ccf 100644 --- a/textclient/src/tuiconfig.c +++ b/textclient/src/tuiconfig.c @@ -427,6 +427,13 @@ void do_internet_configuration(CtdlIPC *ipc) while (!IsEmptyStr(resp)) { extract_token(buf, resp, 0, '\n', sizeof buf); remove_token(resp, 0, '\n'); + + // VILE SLEAZY HACK: replace obsolete "directory" domains with "localhost" + char *d = strstr(buf, "|directory"); + if (d != NULL) { + strcpy(d, "|localhost"); + } + ++num_recs; if (num_recs == 1) recs = malloc(sizeof(char *)); else recs = realloc(recs, (sizeof(char *)) * num_recs); -- 2.30.2