mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 16:54:38 +08:00
Fix the simple service example
This commit is contained in:
parent
b326ad96e3
commit
6e5682847b
@ -109,10 +109,10 @@ if len(sys.argv) > 1:
|
||||
else:
|
||||
path = manager.DefaultAdapter()
|
||||
|
||||
adapter = dbus.Interface(bus.get_object("org.bluez", path),
|
||||
"org.bluez.Adapter")
|
||||
service = dbus.Interface(bus.get_object("org.bluez", path),
|
||||
"org.bluez.Service")
|
||||
|
||||
handle = adapter.AddServiceRecord(xml)
|
||||
handle = service.AddRecord(xml)
|
||||
|
||||
print "Service record with handle 0x%04x added" % (handle)
|
||||
|
||||
@ -124,4 +124,4 @@ try:
|
||||
except:
|
||||
pass
|
||||
|
||||
adapter.RemoveServiceRecord(dbus.UInt32(handle))
|
||||
service.RemoveRecord(dbus.UInt32(handle))
|
||||
|
Loading…
Reference in New Issue
Block a user