* fix HTTPS; this broke while migrating the request data to strbuf
[citadel.git] / webcit / crypto.c
index 1959c50484278bb2bb22bba61e5812b929af9635..972fbaa3a183e0d5bbb28790590e8326fb02751d 100644 (file)
@@ -457,15 +457,18 @@ void ssl_lock(int mode, int n, const char *file, int line)
  * \param buf chars to send to the client
  * \param nbytes how many chars
  */
-void client_write_ssl(const char *buf, int nbytes)
+void client_write_ssl(const StrBuf *Buf)
 {
+       const char *buf;
        int retval;
        int nremain;
+       long nbytes;
        char junk[1];
 
        if (THREADSSL == NULL) return;
 
-       nremain = nbytes;
+       nbytes = nremain = StrLength(Buf);
+       buf = ChrPtr(Buf);
 
        while (nremain > 0) {
                if (SSL_want_write(THREADSSL)) {