Francois Gouget : winhttp: netconn_get_next_line() is not used anymore so remove it.
Alexandre Julliard
julliard at winehq.org
Tue Mar 26 15:11:13 CDT 2013
Module: wine
Branch: master
Commit: fbe7ab5c5af9b7ca3decc82ae986be2c78fa6165
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fbe7ab5c5af9b7ca3decc82ae986be2c78fa6165
Author: Francois Gouget <fgouget at free.fr>
Date: Tue Mar 26 16:27:51 2013 +0100
winhttp: netconn_get_next_line() is not used anymore so remove it.
---
dlls/winhttp/net.c | 75 ----------------------------------------
dlls/winhttp/winhttp_private.h | 1 -
2 files changed, 0 insertions(+), 76 deletions(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 631939a..bc83542 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -734,81 +734,6 @@ BOOL netconn_query_data_available( netconn_t *conn, DWORD *available )
return TRUE;
}
-BOOL netconn_get_next_line( netconn_t *conn, char *buffer, DWORD *buflen )
-{
- struct pollfd pfd;
- BOOL ret = FALSE;
- DWORD recvd = 0;
-
- if (!netconn_connected( conn )) return FALSE;
-
- if (conn->secure)
- {
- while (recvd < *buflen)
- {
- int dummy;
- if (!netconn_recv( conn, &buffer[recvd], 1, 0, &dummy ))
- {
- set_last_error( ERROR_CONNECTION_ABORTED );
- break;
- }
- if (buffer[recvd] == '\n')
- {
- ret = TRUE;
- break;
- }
- if (buffer[recvd] != '\r') recvd++;
- }
- if (ret)
- {
- buffer[recvd++] = 0;
- *buflen = recvd;
- TRACE("received line %s\n", debugstr_a(buffer));
- }
- return ret;
- }
-
- pfd.fd = conn->socket;
- pfd.events = POLLIN;
- while (recvd < *buflen)
- {
- int timeout, res;
- struct timeval tv;
- socklen_t len = sizeof(tv);
-
- if ((res = getsockopt( conn->socket, SOL_SOCKET, SO_RCVTIMEO, (void*)&tv, &len ) != -1))
- timeout = tv.tv_sec * 1000 + tv.tv_usec / 1000;
- else
- timeout = -1;
- if (poll( &pfd, 1, timeout ) > 0)
- {
- if ((res = recv( conn->socket, &buffer[recvd], 1, 0 )) <= 0)
- {
- if (res == -1) set_last_error( sock_get_error( errno ) );
- break;
- }
- if (buffer[recvd] == '\n')
- {
- ret = TRUE;
- break;
- }
- if (buffer[recvd] != '\r') recvd++;
- }
- else
- {
- set_last_error( ERROR_WINHTTP_TIMEOUT );
- break;
- }
- }
- if (ret)
- {
- buffer[recvd++] = 0;
- *buflen = recvd;
- TRACE("received line %s\n", debugstr_a(buffer));
- }
- return ret;
-}
-
DWORD netconn_set_timeout( netconn_t *netconn, BOOL send, int value )
{
struct timeval tv;
diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h
index b19aadf..82b4582 100644
--- a/dlls/winhttp/winhttp_private.h
+++ b/dlls/winhttp/winhttp_private.h
@@ -235,7 +235,6 @@ BOOL netconn_close( netconn_t * ) DECLSPEC_HIDDEN;
BOOL netconn_connect( netconn_t *, const struct sockaddr *, unsigned int, int ) DECLSPEC_HIDDEN;
BOOL netconn_connected( netconn_t * ) DECLSPEC_HIDDEN;
BOOL netconn_create( netconn_t *, int, int, int ) DECLSPEC_HIDDEN;
-BOOL netconn_get_next_line( netconn_t *, char *, DWORD * ) DECLSPEC_HIDDEN;
BOOL netconn_init( netconn_t * ) DECLSPEC_HIDDEN;
void netconn_unload( void ) DECLSPEC_HIDDEN;
BOOL netconn_query_data_available( netconn_t *, DWORD * ) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list