switch krb5_socket_t
This commit is contained in:
@@ -157,7 +157,7 @@ krb5_auth_con_setaddrs(krb5_context context,
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_genaddrs(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
SOCKET fd, int flags)
|
||||
krb5_socket_t fd, int flags)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
krb5_address local_k_address, remote_k_address;
|
||||
@@ -221,7 +221,7 @@ krb5_auth_con_setaddrs_from_fd (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
void *p_fd)
|
||||
{
|
||||
SOCKET fd = *(SOCKET*)p_fd;
|
||||
krb5_socket_t fd = *(krb5_socket_t *)p_fd;
|
||||
int flags = 0;
|
||||
if(auth_context->local_address == NULL)
|
||||
flags |= KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR;
|
||||
|
@@ -39,7 +39,7 @@ krb5_net_read (krb5_context context,
|
||||
void *buf,
|
||||
size_t len)
|
||||
{
|
||||
SOCKET fd = *((SOCKET *)p_fd);
|
||||
krb5_socket_t fd = *((krb5_socket_t *)p_fd);
|
||||
|
||||
#ifdef SOCKET_IS_NOT_AN_FD
|
||||
#ifdef _MSC_VER
|
||||
@@ -51,7 +51,7 @@ krb5_net_read (krb5_context context,
|
||||
}
|
||||
}
|
||||
#else
|
||||
#error Don't know how to handle socket that may be an fd
|
||||
#error Dont know how to handle socket that may be an fd
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -39,7 +39,7 @@ krb5_net_write (krb5_context context,
|
||||
const void *buf,
|
||||
size_t len)
|
||||
{
|
||||
SOCKET fd = *((SOCKET *)p_fd);
|
||||
krb5_socket_t fd = *((krb5_socket_t *)p_fd);
|
||||
|
||||
#ifdef SOCKET_IS_NOT_AN_FD
|
||||
#ifdef _MSC_VER
|
||||
@@ -51,7 +51,7 @@ krb5_net_write (krb5_context context,
|
||||
}
|
||||
}
|
||||
#else
|
||||
#error Don't know how to handle SOCKET that may be an fd
|
||||
#error Dont know how to handle SOCKET that may be an fd
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -65,7 +65,7 @@ krb5_net_write_block(krb5_context context,
|
||||
size_t len,
|
||||
time_t timeout)
|
||||
{
|
||||
SOCKET fd = *((SOCKET *)p_fd);
|
||||
krb5_socket_t fd = *((krb5_socket_t *)p_fd);
|
||||
int ret;
|
||||
struct timeval tv, *tvp;
|
||||
const char *cbuf = (const char *)buf;
|
||||
|
@@ -47,7 +47,7 @@ struct send_to_kdc {
|
||||
*/
|
||||
|
||||
static int
|
||||
recv_loop (SOCKET fd,
|
||||
recv_loop (krb5_socket_t fd,
|
||||
time_t tmout,
|
||||
int udp,
|
||||
size_t limit,
|
||||
@@ -113,7 +113,7 @@ recv_loop (SOCKET fd,
|
||||
*/
|
||||
|
||||
static int
|
||||
send_and_recv_udp(SOCKET fd,
|
||||
send_and_recv_udp(krb5_socket_t fd,
|
||||
time_t tmout,
|
||||
const krb5_data *req,
|
||||
krb5_data *rep)
|
||||
@@ -132,7 +132,7 @@ send_and_recv_udp(SOCKET fd,
|
||||
*/
|
||||
|
||||
static int
|
||||
send_and_recv_tcp(SOCKET fd,
|
||||
send_and_recv_tcp(krb5_socket_t fd,
|
||||
time_t tmout,
|
||||
const krb5_data *req,
|
||||
krb5_data *rep)
|
||||
@@ -164,7 +164,7 @@ send_and_recv_tcp(SOCKET fd,
|
||||
}
|
||||
|
||||
int
|
||||
_krb5_send_and_recv_tcp(SOCKET fd,
|
||||
_krb5_send_and_recv_tcp(krb5_socket_t fd,
|
||||
time_t tmout,
|
||||
const krb5_data *req,
|
||||
krb5_data *rep)
|
||||
@@ -177,7 +177,7 @@ _krb5_send_and_recv_tcp(SOCKET fd,
|
||||
*/
|
||||
|
||||
static int
|
||||
send_and_recv_http(SOCKET fd,
|
||||
send_and_recv_http(krb5_socket_t fd,
|
||||
time_t tmout,
|
||||
const char *prefix,
|
||||
const krb5_data *req,
|
||||
@@ -266,7 +266,7 @@ send_via_proxy (krb5_context context,
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *ai, *a;
|
||||
int ret;
|
||||
SOCKET s = INVALID_SOCKET;
|
||||
krb5_socket_t s = INVALID_SOCKET;
|
||||
char portstr[NI_MAXSERV];
|
||||
|
||||
if (proxy == NULL)
|
||||
@@ -370,7 +370,7 @@ krb5_sendto (krb5_context context,
|
||||
krb5_data *receive)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
SOCKET fd;
|
||||
krb5_socket_t fd;
|
||||
int i;
|
||||
|
||||
krb5_data_zero(receive);
|
||||
|
@@ -86,7 +86,7 @@ fd_free(krb5_storage * sp)
|
||||
*/
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL
|
||||
krb5_storage_from_fd(SOCKET fd_in)
|
||||
krb5_storage_from_fd(krb5_socket_t fd_in)
|
||||
{
|
||||
krb5_storage *sp;
|
||||
int fd;
|
||||
@@ -99,7 +99,7 @@ krb5_storage_from_fd(SOCKET fd_in)
|
||||
fd = _open_osfhandle(fd_in, 0);
|
||||
}
|
||||
#else
|
||||
#error Don't know how to deal with fd that may or may not be a socket.
|
||||
#error Dont know how to deal with fd that may or may not be a socket.
|
||||
#endif
|
||||
#else /* SOCKET_IS_NOT_AN_FD */
|
||||
fd = dup(fd_in);
|
||||
|
Reference in New Issue
Block a user