From f4edff1233c3a74bfbdda13e2fa70ff29655dea8 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 16 Jan 2003 04:17:02 +0000 Subject: [PATCH] * citadel_ipc.c: when issuing a SPEX command, send the string value for room/floor/site instead of the number. citserver wants a string. * ipc_c_tcp.c: don't call SSL_shutdown() from connection_died(). This just causes it to segfault because there's no valid socket. --- citadel/ChangeLog | 7 ++++++- citadel/citadel_ipc.c | 3 ++- citadel/ipc_c_tcp.c | 4 ++++ citadel/policy.c | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index d88981748..328593fdb 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,10 @@ $Log$ + Revision 601.112 2003/01/16 04:17:02 ajc + * citadel_ipc.c: when issuing a SPEX command, send the string value for + room/floor/site instead of the number. citserver wants a string. + * ipc_c_tcp.c: don't call SSL_shutdown() from connection_died(). This just + causes it to segfault because there's no valid socket. + Revision 601.111 2003/01/16 03:41:45 ajc * Renamed "dynloader" to "serv_extensions" globally. We don't want people to think we have a dynamic loader, do we? :) @@ -4390,4 +4396,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citadel_ipc.c b/citadel/citadel_ipc.c index ce02f1ff2..a7e185f8f 100644 --- a/citadel/citadel_ipc.c +++ b/citadel/citadel_ipc.c @@ -1748,6 +1748,7 @@ int CtdlIPCSetMessageExpirationPolicy(CtdlIPC *ipc, int which, struct ExpirePolicy *policy, char *cret) { char aaa[38]; + char *whichvals[] = { "room", "floor", "site" }; if (!cret) return -2; if (which < 0 || which > 2) return -2; @@ -1755,7 +1756,7 @@ int CtdlIPCSetMessageExpirationPolicy(CtdlIPC *ipc, int which, if (policy->expire_mode < 0 || policy->expire_mode > 3) return -2; if (policy->expire_mode >= 2 && policy->expire_value < 1) return -2; - sprintf(aaa, "SPEX %d|%d|%d", which, + sprintf(aaa, "SPEX %s|%d|%d", whichvals[which], policy->expire_mode, policy->expire_value); return CtdlIPCGenericCommand(ipc, aaa, NULL, 0, NULL, NULL, cret); } diff --git a/citadel/ipc_c_tcp.c b/citadel/ipc_c_tcp.c index 1e8e8dcb4..b26af28ea 100644 --- a/citadel/ipc_c_tcp.c +++ b/citadel/ipc_c_tcp.c @@ -56,7 +56,11 @@ void connection_died(CtdlIPC *ipc) { "Please re-connect and log in again.\n", strerror(errno)); #ifdef HAVE_OPENSSL + + /* ...don't try to shut down a connection on a dead socket? SSL_shutdown(ipc->ssl); + */ + SSL_free(ipc->ssl); ipc->ssl = NULL; #endif diff --git a/citadel/policy.c b/citadel/policy.c index 6ce8ed570..fce225c5c 100644 --- a/citadel/policy.c +++ b/citadel/policy.c @@ -85,7 +85,7 @@ void cmd_gpex(char *argbuf) { memcpy(&exp, &config.c_ep, sizeof(struct ExpirePolicy)); } else { - cprintf("%d Invalid keyword.\n", ERROR); + cprintf("%d Invalid keyword \"%s\"\n", ERROR, which); return; } @@ -151,7 +151,7 @@ void cmd_spex(char *argbuf) { } else { - cprintf("%d Invalid keyword.\n", ERROR); + cprintf("%d Invalid keyword \"%s\"\n", ERROR, which); return; } -- 2.39.2