* citadel_ipc.c: when issuing a SPEX command, send the string value for
authorArt Cancro <ajc@citadel.org>
Thu, 16 Jan 2003 04:17:02 +0000 (04:17 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 16 Jan 2003 04:17:02 +0000 (04:17 +0000)
  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
citadel/citadel_ipc.c
citadel/ipc_c_tcp.c
citadel/policy.c

index d889817488b26ca53d46685d1d02c5ea030c3f48..328593fdb3a89ac788b0fba9142523c1da99dc51 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index ce02f1ff2a514665099f129dcf789da407375f89..a7e185f8f63c98b4d833037fbb2d497d1085d483 100644 (file)
@@ -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);
 }
index 1e8e8dcb44a3477573b3968a3d0019c28a38ed4a..b26af28ea5e1e83dc9ac7d8c9664e33c08d298dc 100644 (file)
@@ -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
index 6ce8ed5701151543827c5075c3d6a5f56b31f228..fce225c5c0f1931644e340e5e586b8d877abdde7 100644 (file)
@@ -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;
        }