Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
5589ea8d
Commit
5589ea8d
authored
Jan 17, 2012
by
JINMEI Tatuya
Browse files
[master] Merge branch 'trac1546'
parents
73d2c507
354bb735
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/main.cc
View file @
5589ea8d
...
...
@@ -154,13 +154,15 @@ main(int argc, char* argv[]) {
cc_session
=
new
Session
(
io_service
.
get_io_service
());
LOG_DEBUG
(
auth_logger
,
DBG_AUTH_START
,
AUTH_CONFIG_CHANNEL_CREATED
);
// Initialize the Socket Requestor
isc
::
server_common
::
initSocketReq
e
ustor
(
*
cc_session
);
isc
::
server_common
::
initSocketRequ
e
stor
(
*
cc_session
);
// We delay starting listening to new commands/config just before we
// go into the main loop to avoid confusion due to mixture of
// synchronous and asynchronous operations (this would happen in
// initializing TSIG keys below). Until then all operations on the
// CC session will take place synchronously.
// initial communication with the boss that takes place in
// updateConfig() for listen_on and in initializing TSIG keys below).
// Until then all operations on the CC session will take place
// synchronously.
config_session
=
new
ModuleCCSession
(
specfile
,
*
cc_session
,
my_config_handler
,
my_command_handler
,
false
);
...
...
src/bin/resolver/main.cc
View file @
5589ea8d
...
...
@@ -202,10 +202,13 @@ main(int argc, char* argv[]) {
LOG_DEBUG
(
resolver_logger
,
RESOLVER_DBG_INIT
,
RESOLVER_SERVICE_CREATED
);
cc_session
=
new
Session
(
io_service
.
get_io_service
());
isc
::
server_common
::
initSocketReqeustor
(
*
cc_session
);
isc
::
server_common
::
initSocketRequestor
(
*
cc_session
);
// We delay starting listening to new commands/config just before we
// go into the main loop. See auth/main.cc for the rationale.
config_session
=
new
ModuleCCSession
(
specfile
,
*
cc_session
,
my_config_handler
,
my_command_handler
);
my_command_handler
,
false
);
LOG_DEBUG
(
resolver_logger
,
RESOLVER_DBG_INIT
,
RESOLVER_CONFIG_CHANNEL
);
resolver
->
setConfigSession
(
config_session
);
...
...
@@ -218,6 +221,9 @@ main(int argc, char* argv[]) {
resolver
->
updateConfig
(
config_session
->
getFullConfig
(),
true
);
LOG_DEBUG
(
resolver_logger
,
RESOLVER_DBG_INIT
,
RESOLVER_CONFIG_LOADED
);
// Now start asynchronous read.
config_session
->
start
();
LOG_INFO
(
resolver_logger
,
RESOLVER_STARTED
);
io_service
.
run
();
}
catch
(
const
std
::
exception
&
ex
)
{
...
...
src/lib/server_common/socket_request.cc
View file @
5589ea8d
...
...
@@ -380,7 +380,7 @@ socketRequestor() {
}
void
initSocketReq
e
ustor
(
cc
::
AbstractSession
&
session
)
{
initSocketRequ
e
stor
(
cc
::
AbstractSession
&
session
)
{
if
(
requestor
!=
NULL
)
{
isc_throw
(
InvalidOperation
,
"The socket requestor was already initialized"
);
...
...
src/lib/server_common/socket_request.h
View file @
5589ea8d
...
...
@@ -168,7 +168,7 @@ SocketRequestor& socketRequestor();
/// \param session the CC session that'll be used to talk to the
/// socket creator.
/// \throw InvalidOperation when it is called more than once
void
initSocketReq
e
ustor
(
cc
::
AbstractSession
&
session
);
void
initSocketRequ
e
stor
(
cc
::
AbstractSession
&
session
);
/// \brief Initialization for tests
///
...
...
src/lib/server_common/tests/socket_requestor_test.cc
View file @
5589ea8d
...
...
@@ -83,7 +83,7 @@ public:
ElementPtr
(
new
ListElement
),
ElementPtr
(
new
ListElement
))
{
initSocketReq
e
ustor
(
session
);
initSocketRequ
e
stor
(
session
);
}
~
SocketRequestorTest
()
{
...
...
Write
Preview
Markdown
is supported
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