HUGE PATCH. This moves all of mime_parser.c and all
[citadel.git] / citadel / citserver.c
index a25a2ea2077e69332092e67c537395c807eb7d91..6a85744a55ce04d0a653223c7af813b2d0bc07f4 100644 (file)
@@ -40,6 +40,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <libcitadel.h>
 #include "citadel.h"
 #include "server.h"
 #include "sysdep_decls.h"
@@ -55,7 +56,6 @@
 #include "file_ops.h"
 #include "policy.h"
 #include "control.h"
-#include "tools.h"
 #include "euidindex.h"
 
 #ifndef HAVE_SNPRINTF
@@ -824,7 +824,7 @@ void cmd_down(char *argbuf) {
        }
        else
        {
-               cprintf(Reply, CIT_OK);
+               cprintf(Reply, CIT_OK + SERVER_SHUTTING_DOWN);
        }
        time_to_die = 1;
 }
@@ -928,10 +928,10 @@ void begin_session(struct CitContext *con)
        strcpy(con->lastcmdname, "    ");
        strcpy(con->cs_clientname, "(unknown)");
        strcpy(con->curr_user, NLI);
-       strcpy(con->net_node, "");
-       strcpy(con->fake_username, "");
-       strcpy(con->fake_hostname, "");
-       strcpy(con->fake_roomname, "");
+       *con->net_node = '\0';
+       *con->fake_username = '\0';
+       *con->fake_hostname = '\0';
+       *con->fake_roomname = '\0';
        generate_nonce(con);
        safestrncpy(con->cs_host, config.c_fqdn, sizeof con->cs_host);
        safestrncpy(con->cs_addr, "", sizeof con->cs_addr);