Commit c612e8e2 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2911] cleanup: remove db_file arg from XfrinConnection ctor.

this class now doesn't rely on the low level interface anymore.
parent 1ab87fb5
......@@ -283,7 +283,7 @@ class MockXfrinConnection(XfrinConnection):
def __init__(self, sock_map, zone_name, rrclass, datasrc_client,
shutdown_event, master_addr, tsig_key=None):
super().__init__(sock_map, zone_name, rrclass, MockDataSourceClient(),
shutdown_event, master_addr, TEST_DB_FILE)
shutdown_event, master_addr)
self.query_data = b''
self.reply_data = b''
self.force_time_out = False
......@@ -565,13 +565,10 @@ class XfrinConnection(asyncore.dispatcher):
def __init__(self,
sock_map, zone_name, rrclass, datasrc_client,
shutdown_event, master_addrinfo, db_file, tsig_key=None,
shutdown_event, master_addrinfo, tsig_key=None,
'''Constructor of the XfirnConnection class.
db_file: SQLite3 DB file. Unforutnately we still need this for
temporary workaround in _get_zone_soa(). This should be
removed when we eliminate the need for the workaround.
idle_timeout: max idle time for read data from socket.
datasrc_client: the data source client object used for the XFR session.
This will eventually replace db_file completely.
......@@ -595,7 +592,6 @@ class XfrinConnection(asyncore.dispatcher):
self._rrclass = rrclass
# Data source handler
self._db_file = db_file
self._datasrc_client = datasrc_client
self._zone_soa = self._get_zone_soa()
......@@ -1147,8 +1143,7 @@ def __process_xfrin(server, zone_name, rrclass, db_file,
while retry:
retry = False
conn = conn_class(sock_map, zone_name, rrclass, datasrc_client,
shutdown_event, master_addrinfo, db_file,
shutdown_event, master_addrinfo, tsig_key)
if conn.connect_to_master():
Supports Markdown
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