]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/http.c
Update ipp documentation to reflect the behavior of configuring WiFi on IPP USB printers.
[thirdparty/cups.git] / cups / http.c
index fbb1bf13cce520cd7438637a1661a1b8ff738c6f..43ace18f4428f7313809e644dead8b4af81a677a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * HTTP routines for CUPS.
  *
- * Copyright © 2007-2019 by Apple Inc.
+ * Copyright © 2007-2021 by Apple Inc.
  * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
  * This file contains Kerberos support code, copyright 2006 by
@@ -1733,7 +1733,7 @@ httpPeek(http_t *http,                    /* I - HTTP connection */
 
     if (http->used > 0 && ((z_stream *)http->stream)->avail_in < HTTP_MAX_BUFFER)
     {
-      size_t buflen = buflen = HTTP_MAX_BUFFER - ((z_stream *)http->stream)->avail_in;
+      size_t buflen = HTTP_MAX_BUFFER - ((z_stream *)http->stream)->avail_in;
                                        /* Number of bytes to copy */
 
       if (((z_stream *)http->stream)->avail_in > 0 &&
@@ -2421,6 +2421,7 @@ httpReconnect2(http_t *http,              /* I - HTTP connection */
     if (_httpTLSStart(http) != 0)
     {
       httpAddrClose(NULL, http->fd);
+      http->fd = -1;
 
       return (-1);
     }
@@ -2786,6 +2787,7 @@ _httpUpdate(http_t        *http,  /* I - HTTP connection */
       if (_httpTLSStart(http) != 0)
       {
         httpAddrClose(NULL, http->fd);
+        http->fd = -1;
 
        *status = http->status = HTTP_STATUS_ERROR;
        return (0);