Commit d71c306a authored by JINMEI Tatuya's avatar JINMEI Tatuya

fixed build problem without boost::sys and boost::python.

(first aid workaround with ugly ifdef's, but worked)
also fixed the problem that "from source" didn't work.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1636 e5f2f494-b856-4b98-b285-d166d9295462
parent 76ca7597
......@@ -42,14 +42,20 @@
#include <cc/session.h>
#include <cc/data.h>
#include <config/ccsession.h>
#if defined(HAVE_BOOST_SYSTEM) && defined(HAVE_BOOST_PYTHON)
#define USE_XFROUT
#include <xfr/xfrout_client.h>
#endif
#include "spec_config.h"
#include "common.h"
#include "auth_srv.h"
using namespace std;
#ifdef USE_XFROUT
using namespace isc::xfr;
#endif
#ifdef HAVE_BOOST_SYSTEM
using namespace boost::asio;
......@@ -105,6 +111,7 @@ my_command_handler(const string& command, const ElementPtr args) {
return answer;
}
#ifdef USE_XFROUT
//TODO. The sample way for checking axfr query, the code should be merged to auth server class
static bool
check_axfr_query(char *msg_data, uint16_t msg_len)
......@@ -135,6 +142,7 @@ dispatch_axfr_query(int tcp_sock, char axfr_query[], uint16_t query_len)
cerr << "error handle xfr query:" << err.what() << endl;
}
}
#endif
#ifdef HAVE_BOOST_SYSTEM
//
......@@ -181,12 +189,13 @@ public:
{
if (!error) {
InputBuffer dnsbuffer(data_, bytes_transferred);
#ifdef USE_XFROUT
if (check_axfr_query(data_, bytes_transferred)) {
dispatch_axfr_query(socket_.native(), data_, bytes_transferred);
// start to get new query ?
start();
}
else {
} else {
#endif
if (auth_server->processMessage(dnsbuffer, dns_message_,
response_renderer_, false)) {
responselen_buffer_.writeUint16(response_buffer_.getLength());
......@@ -199,7 +208,9 @@ public:
} else {
delete this;
}
#ifdef USE_XFROUT
}
#endif
} else {
delete this;
}
......@@ -577,30 +588,25 @@ processMessageTCP(const int fd, Message& dns_message,
cc += cc0;
}
if (check_axfr_query(&message_buffer[0], size)) {
dispatch_axfr_query(ts, &message_buffer[0], size);
}
else {
InputBuffer buffer(&message_buffer[0], size);
dns_message.clear(Message::PARSE);
response_renderer.clear();
if (auth_server->processMessage(buffer, dns_message, response_renderer,
false)) {
size = response_renderer.getLength();
size_n = htons(size);
if (send(ts, &size_n, 2, 0) == 2) {
cc = send(ts, response_renderer.getData(),
response_renderer.getLength(), 0);
if (cc == -1) {
if (verbose_mode) {
cerr << "[AuthSrv] error in sending TCP response message" <<
endl;
}
} else {
if (verbose_mode) {
cerr << "[XX] sent TCP response: " << cc << " bytes"
<< endl;
}
InputBuffer buffer(&message_buffer[0], size);
dns_message.clear(Message::PARSE);
response_renderer.clear();
if (auth_server->processMessage(buffer, dns_message, response_renderer,
false)) {
size = response_renderer.getLength();
size_n = htons(size);
if (send(ts, &size_n, 2, 0) == 2) {
cc = send(ts, response_renderer.getData(),
response_renderer.getLength(), 0);
if (cc == -1) {
if (verbose_mode) {
cerr << "[AuthSrv] error in sending TCP response message" <<
endl;
}
} else {
if (verbose_mode) {
cerr << "[XX] sent TCP response: " << cc << " bytes"
<< endl;
}
}
} else {
......
......@@ -5,7 +5,7 @@ export PYTHON_EXEC
BIND10_PATH=@abs_top_builddir@/src/bin/bind10
PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/auth:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:@abs_top_builddir@/src/bin/xfrin:$PATH
PATH=@abs_top_builddir@/src/bin/msgq:@abs_top_builddir@/src/bin/auth:@abs_top_builddir@/src/bin/cfgmgr:@abs_top_builddir@/src/bin/cmdctl:@abs_top_builddir@/src/bin/xfrin:@abs_top_builddir@/src/bin/xfrout:$PATH
export PATH
PYTHONPATH=@abs_top_builddir@/src/lib/python
......
......@@ -19,7 +19,6 @@
import sys; sys.path.append ('@@PYTHONPATH@@')
import isc
import isc.cc
import os
import threading
import struct
import signal
......@@ -28,8 +27,6 @@ from socketserver import *
import os
from isc.config.ccsession import *
import socket
from bind10_xfr import *
from bind10_dns import *
from optparse import OptionParser, OptionValueError
try:
from bind10_xfr import *
......
SUBDIRS = exceptions dns cc config auth xfr python
SUBDIRS = exceptions dns cc config auth python
if HAVE_BOOST_PYTHON
if HAVE_BOOST_SYSTEM
SUBDIRS += xfr
endif
endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment