summaryrefslogtreecommitdiff
path: root/cups/http.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2013-10-17 00:23:06 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2013-10-17 00:23:06 +0000
commit87e9839293534bf13dc3d1bf4fc285914770cd12 (patch)
tree56765bc824dde24196ed39f7aae71382ca168e3b /cups/http.c
parenta73ca01e0702e39b14f3896c3631c4913e8ef4c4 (diff)
downloadcups-87e9839293534bf13dc3d1bf4fc285914770cd12.tar.gz
Use httpAddrListen and new httpAddrClose in cupsd and other places that need it.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11337 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/http.c')
-rw-r--r--cups/http.c36
1 files changed, 6 insertions, 30 deletions
diff --git a/cups/http.c b/cups/http.c
index 0e1ff5864..3db98fca2 100644
--- a/cups/http.c
+++ b/cups/http.c
@@ -678,11 +678,7 @@ _httpDisconnect(http_t *http) /* I - HTTP connection */
http_shutdown_ssl(http);
#endif /* HAVE_SSL */
-#ifdef WIN32
- closesocket(http->fd);
-#else
- close(http->fd);
-#endif /* WIN32 */
+ httpAddrClose(NULL, http->fd);
http->fd = -1;
}
@@ -817,11 +813,7 @@ httpFlush(http_t *http) /* I - HTTP connection */
http_shutdown_ssl(http);
#endif /* HAVE_SSL */
-#ifdef WIN32
- closesocket(http->fd);
-#else
- close(http->fd);
-#endif /* WIN32 */
+ httpAddrClose(NULL, http->fd);
http->fd = -1;
}
@@ -2727,11 +2719,7 @@ httpReconnect2(http_t *http, /* I - HTTP connection */
{
DEBUG_printf(("2httpReconnect2: Closing socket %d...", http->fd));
-#ifdef WIN32
- closesocket(http->fd);
-#else
- close(http->fd);
-#endif /* WIN32 */
+ httpAddrClose(NULL, http->fd);
http->fd = -1;
}
@@ -2799,11 +2787,7 @@ httpReconnect2(http_t *http, /* I - HTTP connection */
if (http_setup_ssl(http) != 0)
{
-# ifdef WIN32
- closesocket(http->fd);
-# else
- close(http->fd);
-# endif /* WIN32 */
+ httpAddrClose(NULL, http->fd);
return (-1);
}
@@ -3270,11 +3254,7 @@ _httpUpdate(http_t *http, /* I - HTTP connection */
{
if (http_setup_ssl(http) != 0)
{
-# ifdef WIN32
- closesocket(http->fd);
-# else
- close(http->fd);
-# endif /* WIN32 */
+ httpAddrClose(NULL, http->fd);
*status = http->status = HTTP_STATUS_ERROR;
return (0);
@@ -5742,11 +5722,7 @@ http_upgrade(http_t *http) /* I - HTTP connection */
DEBUG_puts("8http_upgrade: Server does not support HTTP upgrade!");
-# ifdef WIN32
- closesocket(http->fd);
-# else
- close(http->fd);
-# endif
+ httpAddrClose(NULL, http->fd);
http->fd = -1;