Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Petr Menšík
BIND
Commits
8470db5b
Commit
8470db5b
authored
Jun 20, 2000
by
Michael Graff
Browse files
clean up ; remove unneeded function arguments
parent
4b7c8ee5
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/dns/dispatch.c
View file @
8470db5b
...
...
@@ -139,7 +139,7 @@ static inline void startrecv(dns_dispatch_t *);
static
isc_uint32_t
dns_randomid
(
dns_dispatch_t
*
);
static
isc_uint32_t
dns_hash
(
dns_dispatch_t
*
,
isc_sockaddr_t
*
,
isc_uint32_t
);
static
void
free_buffer
(
dns_dispatch_t
*
disp
,
void
*
buf
,
unsigned
int
len
);
static
void
*
allocate_udp_buffer
(
dns_dispatch_t
*
disp
,
unsigned
int
len
);
static
void
*
allocate_udp_buffer
(
dns_dispatch_t
*
disp
);
static
inline
void
free_event
(
dns_dispatch_t
*
disp
,
dns_dispatchevent_t
*
ev
);
static
inline
dns_dispatchevent_t
*
allocate_event
(
dns_dispatch_t
*
disp
);
static
void
do_next_request
(
dns_dispatch_t
*
disp
,
dns_dispentry_t
*
resp
);
...
...
@@ -386,11 +386,9 @@ free_buffer(dns_dispatch_t *disp, void *buf, unsigned int len) {
}
static
void
*
allocate_udp_buffer
(
dns_dispatch_t
*
disp
,
unsigned
int
len
)
{
allocate_udp_buffer
(
dns_dispatch_t
*
disp
)
{
void
*
temp
;
INSIST
(
len
>
0
&&
len
==
disp
->
buffersize
);
temp
=
isc_mempool_get
(
disp
->
bpool
);
if
(
temp
!=
NULL
)
...
...
@@ -836,8 +834,7 @@ startrecv(dns_dispatch_t *disp) {
*/
case
isc_sockettype_udp
:
region
.
length
=
disp
->
buffersize
;
region
.
base
=
allocate_udp_buffer
(
disp
,
disp
->
buffersize
);
region
.
base
=
allocate_udp_buffer
(
disp
);
if
(
region
.
base
==
NULL
)
return
;
res
=
isc_socket_recv
(
disp
->
socket
,
&
region
,
1
,
...
...
lib/isc/unix/socket.c
View file @
8470db5b
...
...
@@ -209,11 +209,9 @@ static void internal_recv(isc_task_t *, isc_event_t *);
static
void
internal_send
(
isc_task_t
*
,
isc_event_t
*
);
static
void
process_cmsg
(
isc_socket_t
*
,
struct
msghdr
*
,
isc_socketevent_t
*
);
static
void
build_msghdr_send
(
isc_socket_t
*
,
isc_socketevent_t
*
,
struct
msghdr
*
,
struct
iovec
*
,
unsigned
int
,
size_t
*
);
struct
msghdr
*
,
struct
iovec
*
,
size_t
*
);
static
void
build_msghdr_recv
(
isc_socket_t
*
,
isc_socketevent_t
*
,
struct
msghdr
*
,
struct
iovec
*
,
unsigned
int
,
size_t
*
);
struct
msghdr
*
,
struct
iovec
*
,
size_t
*
);
#define SELECT_POKE_SHUTDOWN (-1)
#define SELECT_POKE_NOTHING (-2)
...
...
@@ -438,8 +436,7 @@ process_cmsg(isc_socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
*/
static
void
build_msghdr_send
(
isc_socket_t
*
sock
,
isc_socketevent_t
*
dev
,
struct
msghdr
*
msg
,
struct
iovec
*
iov
,
unsigned
int
maxiov
,
size_t
*
write_countp
)
struct
msghdr
*
msg
,
struct
iovec
*
iov
,
size_t
*
write_countp
)
{
unsigned
int
iovcount
;
isc_buffer_t
*
buffer
;
...
...
@@ -487,7 +484,7 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
}
while
(
buffer
!=
NULL
)
{
INSIST
(
iovcount
<
maxiov
);
INSIST
(
iovcount
<
MAXSCATTERGATHER_SEND
);
isc_buffer_usedregion
(
buffer
,
&
used
);
...
...
@@ -556,8 +553,7 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
*/
static
void
build_msghdr_recv
(
isc_socket_t
*
sock
,
isc_socketevent_t
*
dev
,
struct
msghdr
*
msg
,
struct
iovec
*
iov
,
unsigned
int
maxiov
,
size_t
*
read_countp
)
struct
msghdr
*
msg
,
struct
iovec
*
iov
,
size_t
*
read_countp
)
{
unsigned
int
iovcount
;
isc_buffer_t
*
buffer
;
...
...
@@ -608,7 +604,7 @@ build_msghdr_recv(isc_socket_t *sock, isc_socketevent_t *dev,
iovcount
=
0
;
while
(
buffer
!=
NULL
)
{
INSIST
(
iovcount
<
maxiov
);
INSIST
(
iovcount
<
MAXSCATTERGATHER_RECV
);
isc_buffer_availableregion
(
buffer
,
&
available
);
...
...
@@ -732,8 +728,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
struct
msghdr
msghdr
;
isc_buffer_t
*
buffer
;
build_msghdr_recv
(
sock
,
dev
,
&
msghdr
,
iov
,
MAXSCATTERGATHER_RECV
,
&
read_count
);
build_msghdr_recv
(
sock
,
dev
,
&
msghdr
,
iov
,
&
read_count
);
#if defined(ISC_SOCKET_DEBUG)
dump_msg
(
&
msghdr
);
...
...
@@ -857,9 +852,7 @@ doio_send(isc_socket_t *sock, isc_socketevent_t *dev) {
size_t
write_count
;
struct
msghdr
msghdr
;
/* XXXMLG Should verify that we didn't overflow MAXSCATTERGATHER? */
build_msghdr_send
(
sock
,
dev
,
&
msghdr
,
iov
,
MAXSCATTERGATHER_SEND
,
&
write_count
);
build_msghdr_send
(
sock
,
dev
,
&
msghdr
,
iov
,
&
write_count
);
cc
=
sendmsg
(
sock
->
fd
,
&
msghdr
,
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment