* inetconf.c: fixed memory management problem that was causing all
authorArt Cancro <ajc@citadel.org>
Wed, 16 Feb 2005 05:22:23 +0000 (05:22 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 16 Feb 2005 05:22:23 +0000 (05:22 +0000)
  the inetconf to get discarded during edit on IBM POWER5

webcit/ChangeLog
webcit/inetconf.c
webcit/setup.c
webcit/siteconfig.c

index 441c846f2e8979176f19351d6a4ac102deb1ab5c..95b15ab6fd2052acd031a70889a92a8887b894fa 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 602.1  2005/02/16 05:22:22  ajc
+* inetconf.c: fixed memory management problem that was causing all
+  the inetconf to get discarded during edit on IBM POWER5
+
 Revision 602.0  2005/02/15 05:23:10  ajc
 * THIS IS 6.02
 
@@ -2358,4 +2362,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 49ca952c0375e6f38728a5940c3087083b05b041..ff2c31432594d1d5a30de998905f69b2a3b5b8b5 100644 (file)
@@ -80,13 +80,6 @@ void display_inetconf(void)
        }
        ic_misc = strdup("");
 
-       output_headers(1, 1, 2, 0, 0, 0, 0);
-       wprintf("<div id=\"banner\">\n");
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">Internet configuration</SPAN>\n");
-       wprintf("</TD></TR></TABLE>\n");
-       wprintf("</div>\n<div id=\"content\">\n");
-
        serv_printf("CONF GETSYS|application/x-citadel-internet-config");
        serv_gets(buf);
        if (buf[0] == '1') while (serv_gets(buf), strcmp(buf, "000")) {
@@ -113,7 +106,14 @@ void display_inetconf(void)
 
        }
 
-       wprintf("<TABLE border=0 width=100%%><TR><TD VALIGN=TOP>\n");
+       output_headers(1, 1, 2, 0, 0, 0, 0);
+       wprintf("<div id=\"banner\">\n");
+       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
+       wprintf("<SPAN CLASS=\"titlebar\">Internet configuration</SPAN>\n");
+       wprintf("</TD></TR></TABLE>\n");
+       wprintf("</div>\n<div id=\"content\">\n");
+
+       wprintf("<center><table border=0 width=99%%><tr><td valign=top>\n");
        for (which=0; which<ic_max; ++which) {
                if (which == (ic_max / 2)) {
                        wprintf("</TD><TD VALIGN=TOP>");
@@ -148,8 +148,7 @@ void display_inetconf(void)
                        "</TD></TR></TABLE></FORM>\n");
                do_template("endbox");
        }
-       wprintf("</TD></TR></TABLE>\n");
-
+       wprintf("</td></tr></table></center>\n");
        wDumpContent(1);
 
        for (i=0; i<ic_max; ++i) {
@@ -160,10 +159,15 @@ void display_inetconf(void)
 
 
 void save_inetconf(void) {
-       char buf[SIZ];
-       char ename[SIZ];
-       char etype[SIZ];
-       char newconfig[65536];
+       char *buf;
+       char *ename;
+       char *etype;
+       char *newconfig;
+
+       buf = malloc(SIZ);
+       ename = malloc(SIZ);
+       etype = malloc(SIZ);
+       newconfig = malloc(65536);
 
        strcpy(newconfig, "");
        serv_printf("CONF GETSYS|application/x-citadel-internet-config");
@@ -198,4 +202,9 @@ void save_inetconf(void) {
        }
        
        display_inetconf();
+
+       free(buf);
+       free(ename);
+       free(etype);
+       free(newconfig);
 }
index 70fab68270a08eee726a06ea2a14a200ae703866..e139514ecd7a52f3a21ab7eac8781a3d978125e6 100644 (file)
@@ -461,7 +461,9 @@ void check_inittab_entry(void)
        char question[SIZ];
        char entryname[5];
        char http_port[128];
+#ifdef HAVE_OPENSSL
        char https_port[128];
+#endif
        char hostname[128];
        char portname[128];
 
index 25bc8bebf71002288daf0e99c59643d20f6f86d2..36704dde86553a0150fea7b560aa4e309ae845d1 100644 (file)
@@ -327,7 +327,7 @@ void display_siteconfig(void)
                        break;
                case 15:
                        if (!strcasecmp(whichmenu, "tuning")) {
-                               wprintf("<TR><TD>Maximum concurrent sessions</TD><TD>");
+                               wprintf("<TR><TD>Maximum concurrent sessions (0 = no limit)</TD><TD>");
                                wprintf("<INPUT TYPE=\"text\" NAME=\"c_maxsessions\" MAXLENGTH=\"5\" VALUE=\"%s\">", buf);
                                wprintf("</TD></TR>\n");
                        }