From 906fa820db1aefd45110306d78d7cca0e75e1b9e Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 23 May 2006 02:01:36 +0000 Subject: [PATCH] * Fixed some compiler warnings in the new unsignedchar-safe version of text_to_server_qp() * Added in an ifdef block around the call to endtls() to make it safe to compile on non-OpenSSL hosts --- webcit/serv_func.c | 14 +++++++------- webcit/webserver.c | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/webcit/serv_func.c b/webcit/serv_func.c index 248a78876..188129e0d 100644 --- a/webcit/serv_func.c +++ b/webcit/serv_func.c @@ -254,12 +254,12 @@ void text_to_server_qp(char *ptr) /* hard line break */ if (output_len > 0) { if (isspace(buf[output_len-1])) { - sprintf(&buf[output_len-1], "=%02X", buf[output_len-1]); + sprintf((char *)&buf[output_len-1], "=%02X", buf[output_len-1]); output_len += 2; } } buf[output_len++] = 0; - serv_puts(buf); + serv_puts((char *)buf); output_len = 0; } else if (ch == 9) { @@ -272,19 +272,19 @@ void text_to_server_qp(char *ptr) buf[output_len++] = ch; } else { - sprintf(&buf[output_len], "=%02X", ch); + sprintf((char *)&buf[output_len], "=%02X", ch); output_len += 3; } if (output_len > 72) { /* soft line break */ if (isspace(buf[output_len-1])) { - sprintf(&buf[output_len-1], "=%02X", buf[output_len-1]); + sprintf((char *)&buf[output_len-1], "=%02X", buf[output_len-1]); output_len += 2; } buf[output_len++] = '='; buf[output_len++] = 0; - serv_puts(buf); + serv_puts((char *)buf); output_len = 0; } } @@ -292,11 +292,11 @@ void text_to_server_qp(char *ptr) /* end of data - transmit anything that's left */ if (output_len > 0) { if (isspace(buf[output_len-1])) { - sprintf(&buf[output_len-1], "=%02X", buf[output_len-1]); + sprintf((char *)&buf[output_len-1], "=%02X", buf[output_len-1]); output_len += 2; } buf[output_len++] = 0; - serv_puts(buf); + serv_puts((char *)buf); output_len = 0; } } diff --git a/webcit/webserver.c b/webcit/webserver.c index 8e86431dd..50a6dc1e5 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -756,9 +756,11 @@ void worker_entry(void) context_loop(ssock); /** Shut down SSL/TLS if required... */ +#ifdef HAVE_OPENSSL if (is_https) { endtls(); } +#endif /** ...and close the socket. */ lingering_close(ssock); -- 2.30.2