]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/netconfig.c
Can you tell I'm REALLY avoiding another task right now?
[citadel.git] / citadel / server / netconfig.c
index e71d262dab45c5f89969e3f3c95bab87683da11e..f5c0eeb1f1499aacd6468e79c82403854354d432 100644 (file)
@@ -1,28 +1,14 @@
 // This module handles loading, saving, and parsing of room network configurations.
 //
-// Copyright (c) 2000-2022 by the citadel.org team
+// Copyright (c) 2000-2023 by the citadel.org team
 //
 // This program is open source software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License, version 3.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
 
 #include "sysdep.h"
 #include <stdio.h>
 #include <sys/types.h>
 #include <dirent.h>
-
-#ifdef HAVE_SYSCALL_H
-# include <syscall.h>
-#else 
-# if HAVE_SYS_SYSCALL_H
-#  include <sys/syscall.h>
-# endif
-#endif
-#include <dirent.h>
 #include <assert.h>
 #include <libcitadel.h>
 #include "ctdl_module.h"
@@ -49,7 +35,7 @@ void SaveRoomNetConfigFile(long roomnum, const char *raw_netconfig) {
        enc = malloc(len * 2);
 
        if (enc) {
-               enc_len = CtdlEncodeBase64(enc, raw_netconfig, len, 0);
+               enc_len = CtdlEncodeBase64(enc, raw_netconfig, len, BASE64_NO_LINEBREAKS);
                if ((enc_len > 1) && (enc[enc_len-2] == 13)) enc[enc_len-2] = 0;
                if ((enc_len > 0) && (enc[enc_len-1] == 10)) enc[enc_len-1] = 0;
                enc[enc_len] = 0;
@@ -175,9 +161,7 @@ void convert_legacy_netcfg_files(void) {
 }
 
 
-/*
- * Module entry point
- */
+// Module entry point
 char *ctdl_module_init_netconfig(void) {
        if (!threading) {
                convert_legacy_netcfg_files();