diff --git a/ChangeLog b/ChangeLog index 06fc0db75c..8c276b6bbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ + 54. [bug] zhanglikun + bin/xfrout: Enable b10-xfrout can be launched in source + code tree. + (Trac #224, svn r2103) + 53. [bug] zhanglikun bin/bindctl: Generate a unique session ID by using socket.gethostname() instead of socket.gethostbyname(), diff --git a/src/bin/auth/asio_link.cc b/src/bin/auth/asio_link.cc index 1c0b8a83c8..15f4cf8172 100644 --- a/src/bin/auth/asio_link.cc +++ b/src/bin/auth/asio_link.cc @@ -68,7 +68,13 @@ void dispatch_axfr_query(const int tcp_sock, char const axfr_query[], const uint16_t query_len) { - string path(UNIX_SOCKET_FILE); + string path; + if (getenv("B10_FROM_BUILD")) { + path = string(getenv("B10_FROM_BUILD")) + "/auth_xfrout_conn"; + } else { + path = UNIX_SOCKET_FILE; + } + XfroutClient xfr_client(path); try { xfr_client.connect(); diff --git a/src/bin/xfrout/xfrout.py.in b/src/bin/xfrout/xfrout.py.in index d0580553ab..7a659ffeb7 100644 --- a/src/bin/xfrout/xfrout.py.in +++ b/src/bin/xfrout/xfrout.py.in @@ -40,13 +40,14 @@ except ImportError as e: if "B10_FROM_BUILD" in os.environ: SPECFILE_PATH = os.environ["B10_FROM_BUILD"] + "/src/bin/xfrout" + UNIX_SOCKET_FILE= os.environ["B10_FROM_BUILD"] + "/auth_xfrout_conn" else: PREFIX = "@prefix@" DATAROOTDIR = "@datarootdir@" SPECFILE_PATH = "@datadir@/@PACKAGE@".replace("${datarootdir}", DATAROOTDIR).replace("${prefix}", PREFIX) -SPECFILE_LOCATION = SPECFILE_PATH + "/xfrout.spec" -UNIX_SOCKET_FILE = "@@LOCALSTATEDIR@@/auth_xfrout_conn" + UNIX_SOCKET_FILE = "@@LOCALSTATEDIR@@/auth_xfrout_conn" +SPECFILE_LOCATION = SPECFILE_PATH + "/xfrout.spec" MAX_TRANSFERS_OUT = 10 verbose_mode = False