]> code.citadel.org Git - citadel.git/blobdiff - webcit/mainmenu.c
* fix some warnings just visible with -o2
[citadel.git] / webcit / mainmenu.c
index ab3d2f38ab51ca6ebd484a74b41b52ffa924e335..3959e27a65624d4039e9e2e47be6be23e5361619 100644 (file)
@@ -62,7 +62,7 @@ void display_generic(void)
        wprintf("<br /><textarea name=\"g_input\" rows=10 cols=80 width=80></textarea><br />\n");
 
        wprintf("<font size=-2>");
-       wprintf(_("Detected host header is %s://%s"), (is_https ? "https" : "http"), ChrPtr(WC->Hdr->http_host));
+       wprintf(_("Detected host header is %s://%s"), (is_https ? "https" : "http"), ChrPtr(WC->Hdr->HR.http_host));
        wprintf("</font>\n");
        wprintf("<input type=\"submit\" name=\"sc_button\" value=\"%s\">", _("Send command"));
        wprintf("&nbsp;");
@@ -91,9 +91,9 @@ void do_generic(void)
        }
 
        output_headers(1, 1, 0, 0, 0, 0);
-
+       Buf = NewStrBuf();
        serv_puts(bstr("g_cmd"));
-
+       StrBuf_ServGetln(Buf);
        svput("BOXTITLE", WCS_STRING, _("Server command results"));
        do_template("beginboxx", NULL);
 
@@ -143,6 +143,7 @@ void do_generic(void)
        wprintf("<a href=\"display_generic\">Enter another command</a><br />\n");
        wprintf("<a href=\"display_advanced\">Return to menu</a>\n");
        do_template("endbox", NULL);
+       FreeStrBuf(&Buf);
        wDumpContent(1);
 }