summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-03-11 18:53:42 +0000
committerYang Tse <yangsita@gmail.com>2010-03-11 18:53:42 +0000
commit907b09ccd04814cfc4873d073fafcda0bc9aaaed (patch)
tree822a20815122da1fc342e19446a6948af4cafcc4
parent3081404dec56cce26507be52dd6bfe37995e7516 (diff)
downloadc-ares-907b09ccd04814cfc4873d073fafcda0bc9aaaed.tar.gz
c-ares-907b09ccd04814cfc4873d073fafcda0bc9aaaed.tar.bz2
c-ares-907b09ccd04814cfc4873d073fafcda0bc9aaaed.zip
fix compiler warning
-rw-r--r--ares.h2
-rw-r--r--ares_getsock.310
-rw-r--r--ares_getsock.c6
3 files changed, 8 insertions, 10 deletions
diff --git a/ares.h b/ares.h
index c514f25..6d658ad 100644
--- a/ares.h
+++ b/ares.h
@@ -368,7 +368,7 @@ CARES_EXTERN int ares_fds(ares_channel channel,
fd_set *write_fds);
CARES_EXTERN int ares_getsock(ares_channel channel,
- int *socks,
+ ares_socket_t *socks,
int numsocks);
CARES_EXTERN struct timeval *ares_timeout(ares_channel channel,
diff --git a/ares_getsock.3 b/ares_getsock.3
index 57254cd..ef07fb9 100644
--- a/ares_getsock.3
+++ b/ares_getsock.3
@@ -14,25 +14,25 @@
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
-.TH ARES_GETSOCK 3 "22 December 2005"
+.TH ARES_GETSOCK 3 "11 March 2010"
.SH NAME
-ares_getsock \- get file descriptors to wait on
+ares_getsock \- get socket descriptors to wait on
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
-.B int ares_getsock(ares_channel \fIchannel\fP, int *\fIsocks\fP,
+.B int ares_getsock(ares_channel \fIchannel\fP, ares_socket_t *\fIsocks\fP,
.B int \fInumsocks\fP);
.fi
.SH DESCRIPTION
The
.B ares_getsock
-function retrieves the set of file descriptors which the calling
+function retrieves the set of socket descriptors which the calling
application should wait on for reading and/or writing for the
processing of name service queries pending on the name service channel
identified by
.IR channel .
-File descriptors will be set in the integer array pointed to by
+Socket descriptors will be set in the socket descriptor array pointed to by
\fIsocks\fP.
\fInumsocks\fP is the size of the given array in number of ints.
diff --git a/ares_getsock.c b/ares_getsock.c
index 1c5e9ff..52aaecd 100644
--- a/ares_getsock.c
+++ b/ares_getsock.c
@@ -1,6 +1,6 @@
/* $Id$ */
-/* Copyright (C) 2005 - 2007, Daniel Stenberg
+/* Copyright (C) 2005 - 2010, Daniel Stenberg
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
@@ -23,7 +23,7 @@
#include "ares_private.h"
int ares_getsock(ares_channel channel,
- int *s,
+ ares_socket_t *socks,
int numsocks) /* size of the 'socks' array */
{
struct server_state *server;
@@ -32,8 +32,6 @@ int ares_getsock(ares_channel channel,
int bitmap = 0;
unsigned int setbits = 0xffffffff;
- ares_socket_t *socks = (ares_socket_t *)s;
-
/* Are there any active queries? */
int active_queries = !ares__is_list_empty(&(channel->all_queries));