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
Sebastian Schrader
Kea
Commits
526b0b5b
Commit
526b0b5b
authored
Jan 06, 2012
by
JINMEI Tatuya
Browse files
[805] fixed a build issue with clang: it doesn't accept the default parameter
value identical to the parameter name itself.
parent
ca3cc561
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/sockcreator/sockcreator.cc
View file @
526b0b5b
...
...
@@ -70,7 +70,7 @@ get_sock(const int type, struct sockaddr *bind_addr, const socklen_t addr_len)
int
run
(
const
int
input_fd
,
const
int
output_fd
,
const
get_sock_t
get_sock
,
const
send_fd_t
send_fd
,
const
close_t
close
)
const
send_fd_t
send_fd
_fun
,
const
close_t
close
_fun
)
{
for
(;;)
{
// Read the command
...
...
@@ -131,11 +131,11 @@ run(const int input_fd, const int output_fd, const get_sock_t get_sock,
if
(
result
>=
0
)
{
// We got the socket
WRITE
(
"S"
,
1
);
// FIXME: Check the output and write a test for it
if
(
send_fd
(
output_fd
,
result
)
==
FD_SYSTEM_ERROR
)
{
if
(
send_fd
_fun
(
output_fd
,
result
)
==
FD_SYSTEM_ERROR
)
{
return
3
;
}
// Don't leak the socket
if
(
close
(
result
)
==
-
1
)
{
if
(
close
_fun
(
result
)
==
-
1
)
{
return
4
;
}
}
else
{
...
...
src/bin/sockcreator/sockcreator.h
View file @
526b0b5b
...
...
@@ -94,14 +94,14 @@ int
* \param send_fd_fun The function that is used to send the socket over
* a file descriptor. This should be left on the default value, it is
* here for testing purposes.
* \param close The close function used to close sockets, coming from
* \param close
_fun
The close function used to close sockets, coming from
* unistd.h. It can be overriden in tests.
*/
int
run
(
const
int
input_fd
,
const
int
output_fd
,
const
get_sock_t
get_sock_fun
=
get_sock
,
const
send_fd_t
send_fd_fun
=
isc
::
util
::
io
::
send_fd
,
const
close_t
close
=
close
);
const
close_t
close
_fun
=
close
);
}
// End of the namespaces
}
...
...
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