Rex Dieter a927022
From 3f56a1195c67734ed8ea0a0bdd862a22f6eb9d52 Mon Sep 17 00:00:00 2001
Rex Dieter a927022
From: Wim Taymans <wtaymans@redhat.com>
Rex Dieter a927022
Date: Fri, 14 Nov 2014 13:07:48 +0100
Rex Dieter a927022
Subject: [PATCH 31/31] backend-native: fix commands
Rex Dieter a927022
Rex Dieter a927022
---
Rex Dieter a927022
 src/modules/bluetooth/backend-native.c | 6 +++---
Rex Dieter a927022
 1 file changed, 3 insertions(+), 3 deletions(-)
Rex Dieter a927022
Rex Dieter a927022
diff --git a/src/modules/bluetooth/backend-native.c b/src/modules/bluetooth/backend-native.c
Rex Dieter a927022
index aa2b756..3def379 100644
Rex Dieter a927022
--- a/src/modules/bluetooth/backend-native.c
Rex Dieter a927022
+++ b/src/modules/bluetooth/backend-native.c
Rex Dieter a927022
@@ -248,7 +248,7 @@ static void rfcomm_io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_i
Rex Dieter a927022
 
Rex Dieter a927022
         pa_log_debug("RFCOMM >> OK");
Rex Dieter a927022
 
Rex Dieter a927022
-        len = write(fd, "\r\nOK\r\n", 5);
Rex Dieter a927022
+        len = write(fd, "\r\nOK\r\n", 6);
Rex Dieter a927022
 
Rex Dieter a927022
         /* we ignore any errors, it's not critical and real errors should
Rex Dieter a927022
          * be caught with the HANGUP and ERROR events handled above */
Rex Dieter a927022
@@ -285,7 +285,7 @@ static void set_speaker_gain(pa_bluetooth_transport *t, uint16_t gain) {
Rex Dieter a927022
 
Rex Dieter a927022
     t->speaker_gain = gain;
Rex Dieter a927022
 
Rex Dieter a927022
-    len = sprintf(buf, "+VGS=%d\r\n", gain);
Rex Dieter a927022
+    len = sprintf(buf, "\r\n+VGS=%d\r\n", gain);
Rex Dieter a927022
     pa_log_debug("RFCOMM >> +VGS=%d", gain);
Rex Dieter a927022
 
Rex Dieter a927022
     written = write(trfc->rfcomm_fd, buf, len);
Rex Dieter a927022
@@ -304,7 +304,7 @@ static void set_microphone_gain(pa_bluetooth_transport *t, uint16_t gain) {
Rex Dieter a927022
 
Rex Dieter a927022
     t->microphone_gain = gain;
Rex Dieter a927022
 
Rex Dieter a927022
-    len = sprintf(buf, "+VGM=%d\r\n", gain);
Rex Dieter a927022
+    len = sprintf(buf, "\r\n+VGM=%d\r\n", gain);
Rex Dieter a927022
     pa_log_debug("RFCOMM >> +VGM=%d", gain);
Rex Dieter a927022
 
Rex Dieter a927022
     written = write (trfc->rfcomm_fd, buf, len);
Rex Dieter a927022
-- 
Rex Dieter a927022
1.9.3
Rex Dieter a927022