text client <.A>ide <S>ysconfig <I>nternet , when encountering a "directory" domain...
authorArt Cancro <ajc@citadel.org>
Wed, 14 Jun 2017 03:06:13 +0000 (23:06 -0400)
committerArt Cancro <ajc@citadel.org>
Wed, 14 Jun 2017 03:06:13 +0000 (23:06 -0400)
citadel/modules/inetcfg/serv_inetcfg.c
textclient/src/tuiconfig.c

index 990302f92d9cc78172d27acda6e75d1f8e97f059..c0ddb356669726b8f0b1adce5e8b3ba88fc56441 100644 (file)
@@ -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 */
index 85649c76b733ea1d13b38285ae657232f6abc2b8..d89ab9ccf3c31baee83dd5ba24186d3550527032 100644 (file)
@@ -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);