Skip to content

Commit

Permalink
change services api (in trace.py)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Oct 22, 2011
1 parent 3960a33 commit aacd3e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion firebirdsql/fbcore.py
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions firebirdsql/services.py
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions misc/trace.py
Expand Up @@ -9,7 +9,7 @@
##############################################################################
import os,sys
sys.path.append('./../')
import firebirdsql
from firebirdsql import services

HOST = 'localhost'
USER = 'sysdba'
Expand All @@ -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()
Expand Down

0 comments on commit aacd3e7

Please sign in to comment.