summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton <anton@picapica>2019-01-02 21:42:50 +0400
committerAnton <anton@picapica>2019-01-02 21:42:50 +0400
commit6c9a3af8cadd787405fc05340d216951c3ee0ba0 (patch)
treec64b7bbee698a2329180f66f256eaa52b568bd06
parentaeafa5a36b12e89129195875e3b497d853f1913e (diff)
downloadpica-pica-6c9a3af8cadd787405fc05340d216951c3ee0ba0.tar.gz
pica-pica-6c9a3af8cadd787405fc05340d216951c3ee0ba0.zip
remove unused PICA_read_socket()
-rw-r--r--PICA_client.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/PICA_client.c b/PICA_client.c
index 5fdd603..5869a2b 100644
--- a/PICA_client.c
+++ b/PICA_client.c
@@ -89,7 +89,6 @@ static int PICA_write_ssl(SSL *ssl, unsigned char *buf, unsigned int *ppos, unsi
static int PICA_read_c2n(struct PICA_c2n *ci);
static int PICA_read_c2c(struct PICA_c2c *chn);
static int PICA_read_ssl(SSL *ssl, unsigned char *buf, unsigned int *ppos, unsigned int size);
-static int PICA_read_socket(SOCKET s, unsigned char *buf, unsigned int *ppos, unsigned int size);
#define MSGINFO_MSGSNUM(arr) (sizeof(arr)/sizeof(struct PICA_msginfo))
const struct PICA_msginfo c2n_messages[] =
@@ -2676,51 +2675,6 @@ int PICA_write_c2c(struct PICA_c2c *chn)
return ret;
}
-int PICA_read_socket(SOCKET s, unsigned char *buf, unsigned int *ppos, unsigned int size)
-{
- int ret;
-
- ret = recv(s, buf + *ppos, size - *ppos, 0);
-
- if (ret == 0)
- return PICA_ERRDISCONNECT;
-
- if (ret < 0)
- {
-#ifdef WIN32
- switch(WSAGetLastError())
- {
- case WSAEINTR:
- case WSAEINPROGRESS:
- case WSAEWOULDBLOCK:
- break;
- default:
- return PICA_ERRSOCK;
- }
-#else
- switch(errno)
- {
- case EAGAIN :
-#if EAGAIN != EWOULDBLOCK
- case EWOULDBLOCK:
-#endif
- case EINTR:
- break;
-
- default:
- return PICA_ERRSOCK;//ERR_CHECK
- }
-#endif
- }
-
- if (ret > 0)
- {
- *ppos += ret;
- }
-
- return PICA_OK;
-}
-
int PICA_read_ssl(SSL *ssl, unsigned char *buf, unsigned int *ppos, unsigned int size)
{
int ret;