]> sjero.net Git - wget/blobdiff - src/gen_sslfunc.c
[svn] Use new macros xnew, xnew0, xnew_array, and xnew0_array in various places.
[wget] / src / gen_sslfunc.c
index d9515130280f47e05196e562abb29a54ce8cc8ec..d9f1ceccbb1bd4a5f0e35aa9dfabba4ea8f99510 100644 (file)
@@ -16,7 +16,17 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with Wget; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+In addition, as a special exception, the Free Software Foundation
+gives permission to link the code of its release of Wget with the
+OpenSSL project's "OpenSSL" library (or with modified versions of it
+that use the same license as the "OpenSSL" library), and distribute
+the linked executables.  You must obey the GNU General Public License
+in all respects for all of the code used other than "OpenSSL".  If you
+modify this file, you may extend this exception to your version of the
+file, but you are not obligated to do so.  If you do not wish to do
+so, delete this exception statement from your version.  */
 
 #include <config.h>
 
@@ -139,8 +149,8 @@ ssl_printerrors (void)
   int ocerr = 0;
   unsigned long curerr = 0;
   char errbuff[1024];
-  memset(errbuff, 0, sizeof(errbuff));
-  while ( 0 != (curerr = ERR_get_error ()))
+  xzero (errbuff);
+  while ((curerr = ERR_get_error ()) != 0)
     {
       DEBUGP (("OpenSSL: %s\n", ERR_error_string (curerr, errbuff)));
       ++ocerr;
@@ -307,8 +317,8 @@ ssl_iread (SSL *con, char *buf, int len)
   int res, fd;
   BIO_get_fd (con->rbio, &fd);
 #ifdef HAVE_SELECT
-  if (opt.timeout && !SSL_pending (con))
-    if (select_fd (fd, opt.timeout, 0) <= 0)
+  if (opt.read_timeout && !SSL_pending (con))
+    if (select_fd (fd, opt.read_timeout, 0) <= 0)
       return -1;
 #endif
   do
@@ -333,8 +343,8 @@ ssl_iwrite (SSL *con, char *buf, int len)
   while (len > 0)
     {
 #ifdef HAVE_SELECT
-      if (opt.timeout)
-       if (select_fd (fd, opt.timeout, 1) <= 0)
+      if (opt.read_timeout)
+       if (select_fd (fd, opt.read_timeout, 1) <= 0)
          return -1;
 #endif
       do