* Fixed some compiler warnings in the new unsignedchar-safe version
authorArt Cancro <ajc@citadel.org>
Tue, 23 May 2006 02:01:36 +0000 (02:01 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 23 May 2006 02:01:36 +0000 (02:01 +0000)
  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
webcit/webserver.c

index 248a788761b1bb5e95837f0d072e1c49b0145222..188129e0dda0322585b61f80dbbbd6fa7567e935 100644 (file)
@@ -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;
        }
 }
index 8e86431dda7cba746eb190a872e63ce6cac08201..50a6dc1e5fc58b7b03d67c43035931bcd35e8f4c 100644 (file)
@@ -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);