Bug 950220 - Unable to change Bluetooth device name from Settings UI. r=echou, a=1.3+
authorShawn Huang <shuang@mozilla.com>
Thu, 16 Jan 2014 14:36:35 +0800
changeset 169317 075d1f1d8e3fd07b76035a515f4b22d1544ac4da
parent 169316 b72da8376ea82558af8e24f7f47178f496025826
child 169318 f4bc0d1cae6ffd2290bbb8638d4b6943fb8c0e88
push id4971
push userryanvm@gmail.com
push dateThu, 16 Jan 2014 21:31:22 +0000
treeherdermozilla-aurora@af30f8d0d27f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechou, 1.3
bugs950220
milestone28.0a2
Bug 950220 - Unable to change Bluetooth device name from Settings UI. r=echou, a=1.3+
dom/bluetooth/bluez/linux/BluetoothDBusService.cpp
--- a/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp
+++ b/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp
@@ -2388,24 +2388,25 @@ BluetoothDBusService::SetProperty(Blueto
                                 DBUS_TYPE_INVALID)) {
     BT_WARNING("Couldn't append arguments to dbus message!");
     return NS_ERROR_FAILURE;
   }
 
   int type;
   int tmp_int;
   void* val;
+  const char* tempStr;
   nsCString str;
   if (aValue.value().type() == BluetoothValue::Tuint32_t) {
     tmp_int = aValue.value().get_uint32_t();
     val = &tmp_int;
     type = DBUS_TYPE_UINT32;
   } else if (aValue.value().type() == BluetoothValue::TnsString) {
     str = NS_ConvertUTF16toUTF8(aValue.value().get_nsString());
-    const char* tempStr = str.get();
+    tempStr = str.get();
     val = &tempStr;
     type = DBUS_TYPE_STRING;
   } else if (aValue.value().type() == BluetoothValue::Tbool) {
     tmp_int = aValue.value().get_bool() ? 1 : 0;
     val = &(tmp_int);
     type = DBUS_TYPE_BOOLEAN;
   } else {
     BT_WARNING("Property type not handled!");