linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] test/example-gatt-server: Fix few copy-paste errors
@ 2016-09-21 20:35 Szymon Janc
  2016-09-21 20:35 ` [PATCH 2/2] test/example-gatt-server: Make test service primary Szymon Janc
  2016-09-22  8:06 ` [PATCH 1/2] test/example-gatt-server: Fix few copy-paste errors Luiz Augusto von Dentz
  0 siblings, 2 replies; 3+ messages in thread
From: Szymon Janc @ 2016-09-21 20:35 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

---
 test/example-gatt-server | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/example-gatt-server b/test/example-gatt-server
index 44ceb70..ecf614f 100755
--- a/test/example-gatt-server
+++ b/test/example-gatt-server
@@ -535,11 +535,11 @@ class TestEncryptCharacteristic(Characteristic):
                 CharacteristicUserDescriptionDescriptor(bus, 3, self))
 
     def ReadValue(self, options):
-        print('TestCharacteristic Read: ' + repr(self.value))
+        print('TestEncryptCharacteristic Read: ' + repr(self.value))
         return self.value
 
     def WriteValue(self, value, options):
-        print('TestCharacteristic Write: ' + repr(value))
+        print('TestEncryptCharacteristic Write: ' + repr(value))
         self.value = value
 
 class TestEncryptDescriptor(Descriptor):
@@ -576,16 +576,16 @@ class TestSecureCharacteristic(Characteristic):
                 ['secure-read', 'secure-write'],
                 service)
         self.value = []
-        self.add_descriptor(TestEncryptDescriptor(bus, 2, self))
+        self.add_descriptor(TestSecureDescriptor(bus, 2, self))
         self.add_descriptor(
                 CharacteristicUserDescriptionDescriptor(bus, 3, self))
 
     def ReadValue(self, options):
-        print('TestCharacteristic Read: ' + repr(self.value))
+        print('TestSecureCharacteristic Read: ' + repr(self.value))
         return self.value
 
     def WriteValue(self, value, options):
-        print('TestCharacteristic Write: ' + repr(value))
+        print('TestSecureCharacteristic Write: ' + repr(value))
         self.value = value
 
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] test/example-gatt-server: Make test service primary
  2016-09-21 20:35 [PATCH 1/2] test/example-gatt-server: Fix few copy-paste errors Szymon Janc
@ 2016-09-21 20:35 ` Szymon Janc
  2016-09-22  8:06 ` [PATCH 1/2] test/example-gatt-server: Fix few copy-paste errors Luiz Augusto von Dentz
  1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2016-09-21 20:35 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

This allows to test from Android until included services support is
added.
---
 test/example-gatt-server | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/example-gatt-server b/test/example-gatt-server
index ecf614f..52c2029 100755
--- a/test/example-gatt-server
+++ b/test/example-gatt-server
@@ -438,7 +438,7 @@ class TestService(Service):
     TEST_SVC_UUID = '12345678-1234-5678-1234-56789abcdef0'
 
     def __init__(self, bus, index):
-        Service.__init__(self, bus, index, self.TEST_SVC_UUID, False)
+        Service.__init__(self, bus, index, self.TEST_SVC_UUID, True)
         self.add_characteristic(TestCharacteristic(bus, 0, self))
         self.add_characteristic(TestEncryptCharacteristic(bus, 1, self))
         self.add_characteristic(TestSecureCharacteristic(bus, 2, self))
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] test/example-gatt-server: Fix few copy-paste errors
  2016-09-21 20:35 [PATCH 1/2] test/example-gatt-server: Fix few copy-paste errors Szymon Janc
  2016-09-21 20:35 ` [PATCH 2/2] test/example-gatt-server: Make test service primary Szymon Janc
@ 2016-09-22  8:06 ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2016-09-22  8:06 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth@vger.kernel.org

Hi Szymon,

On Wed, Sep 21, 2016 at 11:35 PM, Szymon Janc <szymon.janc@codecoup.pl> wrote:
> ---
>  test/example-gatt-server | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/test/example-gatt-server b/test/example-gatt-server
> index 44ceb70..ecf614f 100755
> --- a/test/example-gatt-server
> +++ b/test/example-gatt-server
> @@ -535,11 +535,11 @@ class TestEncryptCharacteristic(Characteristic):
>                  CharacteristicUserDescriptionDescriptor(bus, 3, self))
>
>      def ReadValue(self, options):
> -        print('TestCharacteristic Read: ' + repr(self.value))
> +        print('TestEncryptCharacteristic Read: ' + repr(self.value))
>          return self.value
>
>      def WriteValue(self, value, options):
> -        print('TestCharacteristic Write: ' + repr(value))
> +        print('TestEncryptCharacteristic Write: ' + repr(value))
>          self.value = value
>
>  class TestEncryptDescriptor(Descriptor):
> @@ -576,16 +576,16 @@ class TestSecureCharacteristic(Characteristic):
>                  ['secure-read', 'secure-write'],
>                  service)
>          self.value = []
> -        self.add_descriptor(TestEncryptDescriptor(bus, 2, self))
> +        self.add_descriptor(TestSecureDescriptor(bus, 2, self))
>          self.add_descriptor(
>                  CharacteristicUserDescriptionDescriptor(bus, 3, self))
>
>      def ReadValue(self, options):
> -        print('TestCharacteristic Read: ' + repr(self.value))
> +        print('TestSecureCharacteristic Read: ' + repr(self.value))
>          return self.value
>
>      def WriteValue(self, value, options):
> -        print('TestCharacteristic Write: ' + repr(value))
> +        print('TestSecureCharacteristic Write: ' + repr(value))
>          self.value = value
>
>
> --
> 2.7.4

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-22  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 20:35 [PATCH 1/2] test/example-gatt-server: Fix few copy-paste errors Szymon Janc
2016-09-21 20:35 ` [PATCH 2/2] test/example-gatt-server: Make test service primary Szymon Janc
2016-09-22  8:06 ` [PATCH 1/2] test/example-gatt-server: Fix few copy-paste errors Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).