From aacd3e7a1cfe175ff65a235a923f8fcc856f591a Mon Sep 17 00:00:00 2001 From: Hajime Nakagami Date: Sat, 22 Oct 2011 15:27:10 +0900 Subject: [PATCH] change services api (in trace.py) --- firebirdsql/fbcore.py | 3 ++- firebirdsql/services.py | 2 ++ misc/trace.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/firebirdsql/fbcore.py b/firebirdsql/fbcore.py index ff6554cb..28aa49ff 100755 --- a/firebirdsql/fbcore.py +++ b/firebirdsql/fbcore.py @@ -854,7 +854,8 @@ def _op_service_attach(self): def _op_service_info(self, param, item, buffer_length=512): p = xdrlib.Packer() p.pack_int(self.op_service_info) - p.pack_int(self.svc_handle) +# p.pack_int(self.svc_handle) + p.pack_int(self.db_handle) p.pack_int(0) p.pack_bytes(param) p.pack_bytes(item) diff --git a/firebirdsql/services.py b/firebirdsql/services.py index 8673b65f..b6c59213 100755 --- a/firebirdsql/services.py +++ b/firebirdsql/services.py @@ -140,6 +140,8 @@ def trace_list(self, callback=None): callback(self.bytes_to_str(buf[3:3+ln])) def getServiceManagerVersion(self): +# self._op_service_info(bs([]), bs([0x24])) +# (h, oid, buf) = self._op_response() return 0 def getServerVersion(self): diff --git a/misc/trace.py b/misc/trace.py index 4bf0d773..fcb5523f 100755 --- a/misc/trace.py +++ b/misc/trace.py @@ -9,7 +9,7 @@ ############################################################################## import os,sys sys.path.append('./../') -import firebirdsql +from firebirdsql import services HOST = 'localhost' USER = 'sysdba' @@ -26,7 +26,7 @@ def print_usage(): print_usage() sys.exit(0) -svc = firebirdsql.service_mgr(host=HOST, user=USER, password=PASS) +svc = services.connect(host=HOST, user=USER, password=PASS) if sys.argv[1] == 'start': name = sys.argv[2] if len(sys.argv) == 3 else None cfg = open('/opt/firebird/fbtrace.conf').read()