Diff between b3ba324261e710763e823a99cad09034bb3b5dcd and 9b98a6c7646bc0404c602ca0b5383aec4b996455

Changed Files

File Additions Deletions Status
Makefile.am +1 -1 modified
attrib/client.c +1 -1 modified
attrib/gatt.c +1 -1 modified
audio/a2dp.c +1 -1 modified
audio/avdtp.c +1 -1 modified
audio/gateway.c +1 -0 modified
audio/headset.c +1 -0 modified
audio/telephony-maemo6.c +1 -1 modified
audio/telephony-ofono.c +1 -1 modified
audio/unix.c +1 -1 modified
network/connection.c +1 -1 modified
network/server.c +1 -1 modified
plugins/hciops.c +1 -1 modified
serial/port.c +1 -0 modified
src/adapter.c +1 -0 modified
src/attrib-server.c +1 -1 modified
src/device.c +1 -0 modified
src/eir.c +1 -0 modified
src/glib-compat.h +30 -0 added
src/glib-helper.c +1 -0 modified
src/glib-helper.h +0 -8 modified
src/storage.c +1 -0 modified

Full Patch

diff --git a/Makefile.am b/Makefile.am
index a63c469..eec458e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -301,7 +301,7 @@ src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \
 			src/sdpd-service.c src/sdpd-database.c \
 			src/attrib-server.h src/attrib-server.c \
 			src/sdp-xml.h src/sdp-xml.c \
-			src/textfile.h src/textfile.c \
+			src/textfile.h src/textfile.c src/glib-compat.h \
 			src/glib-helper.h src/glib-helper.c \
 			src/oui.h src/oui.c src/uinput.h src/ppoll.h \
 			src/plugin.h src/plugin.c \
diff --git a/attrib/client.c b/attrib/client.c
index 70cbf15..bfe5877 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -36,7 +36,7 @@
 #include <bluetooth/sdp_lib.h>
 #include <bluetooth/uuid.h>
 
-#include "glib-helper.h"
+#include "glib-compat.h"
 #include "adapter.h"
 #include "device.h"
 #include "log.h"
diff --git a/attrib/gatt.c b/attrib/gatt.c
index a62f348..452a4cf 100644
--- a/attrib/gatt.c
+++ b/attrib/gatt.c
@@ -33,7 +33,7 @@
 #include <bluetooth/sdp.h>
 #include <bluetooth/sdp_lib.h>
 
-#include "glib-helper.h"
+#include "glib-compat.h"
 
 #include "att.h"
 #include "gattrib.h"
diff --git a/audio/a2dp.c b/audio/a2dp.c
index 47be7fd..75ad6ce 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -36,7 +36,7 @@
 #include <bluetooth/sdp.h>
 #include <bluetooth/sdp_lib.h>
 
-#include "glib-helper.h"
+#include "glib-compat.h"
 #include "log.h"
 #include "device.h"
 #include "manager.h"
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 5b24f38..d3568ba 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -52,7 +52,7 @@
 #include "manager.h"
 #include "control.h"
 #include "avdtp.h"
-#include "glib-helper.h"
+#include "glib-compat.h"
 #include "btio.h"
 #include "sink.h"
 #include "source.h"
diff --git a/audio/gateway.c b/audio/gateway.c
index 1a1c035..fb16a3d 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -42,6 +42,7 @@
 #include <bluetooth/sdp.h>
 #include <bluetooth/sdp_lib.h>
 
+#include "glib-compat.h"
 #include "glib-helper.h"
 #include "device.h"
 #include "gateway.h"
diff --git a/audio/headset.c b/audio/headset.c
index f1cda6a..e45e216 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -53,6 +53,7 @@
 #include "error.h"
 #include "telephony.h"
 #include "headset.h"
+#include "glib-compat.h"
 #include "glib-helper.h"
 #include "btio.h"
 #include "dbus-common.h"
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index fb59013..5df3235 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -38,7 +38,7 @@
 
 #include <bluetooth/sdp.h>
 
-#include "glib-helper.h"
+#include "glib-compat.h"
 #include "log.h"
 #include "telephony.h"
 #include "error.h"
diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c
index 26815cf..3607d7f 100644
--- a/audio/telephony-ofono.c
+++ b/audio/telephony-ofono.c
@@ -37,7 +37,7 @@
 
 #include <bluetooth/sdp.h>
 
-#include "glib-helper.h"
+#include "glib-compat.h"
 #include "log.h"
 #include "telephony.h"
 
diff --git a/audio/unix.c b/audio/unix.c
index c2d6d4a..4e0a6f9 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -52,7 +52,7 @@
 #include "source.h"
 #include "gateway.h"
 #include "unix.h"
-#include "glib-helper.h"
+#include "glib-compat.h"
 
 #define check_nul(str) (str[sizeof(str) - 1] == '\0')
 
diff --git a/network/connection.c b/network/connection.c
index ac27cf2..ca1f4b2 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -38,7 +38,7 @@
 #include <gdbus.h>
 
 #include "log.h"
-#include "glib-helper.h"
+#include "glib-compat.h"
 #include "btio.h"
 #include "dbus-common.h"
 #include "adapter.h"
diff --git a/network/server.c b/network/server.c
index 7865f39..6e0ce09 100644
--- a/network/server.c
+++ b/network/server.c
@@ -46,7 +46,7 @@
 #include "error.h"
 #include "sdpd.h"
 #include "btio.h"
-#include "glib-helper.h"
+#include "glib-compat.h"
 
 #include "common.h"
 #include "server.h"
diff --git a/plugins/hciops.c b/plugins/hciops.c
index 8d97f97..90b2112 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -40,7 +40,7 @@
 
 #include <glib.h>
 
-#include "glib-helper.h"
+#include "glib-compat.h"
 #include "hcid.h"
 #include "sdpd.h"
 #include "btio.h"
diff --git a/serial/port.c b/serial/port.c
index 7f5fce1..045f459 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -48,6 +48,7 @@
 #include "../src/dbus-common.h"
 
 #include "log.h"
+#include "glib-compat.h"
 #include "glib-helper.h"
 #include "btio.h"
 
diff --git a/src/adapter.c b/src/adapter.c
index d1ef17c..c2999d1 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -52,6 +52,7 @@
 #include "device.h"
 #include "dbus-common.h"
 #include "error.h"
+#include "glib-compat.h"
 #include "glib-helper.h"
 #include "agent.h"
 #include "storage.h"
diff --git a/src/attrib-server.c b/src/attrib-server.c
index 9ba5f74..e412061 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -38,7 +38,7 @@
 #include <bluetooth/sdp_lib.h>
 
 #include "log.h"
-#include "glib-helper.h"
+#include "glib-compat.h"
 #include "btio.h"
 #include "sdpd.h"
 #include "hcid.h"
diff --git a/src/device.c b/src/device.c
index b7e343b..339c001 100644
--- a/src/device.c
+++ b/src/device.c
@@ -54,6 +54,7 @@
 #include "device.h"
 #include "dbus-common.h"
 #include "error.h"
+#include "glib-compat.h"
 #include "glib-helper.h"
 #include "gatt.h"
 #include "agent.h"
diff --git a/src/eir.c b/src/eir.c
index 8772191..e82d30b 100644
--- a/src/eir.c
+++ b/src/eir.c
@@ -35,6 +35,7 @@
 #include <bluetooth/hci.h>
 #include <bluetooth/sdp.h>
 
+#include "glib-compat.h"
 #include "glib-helper.h"
 #include "eir.h"
 
diff --git a/src/glib-compat.h b/src/glib-compat.h
new file mode 100644
index 0000000..d50d5e9
--- /dev/null
+++ b/src/glib-compat.h
@@ -0,0 +1,30 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2004-2011  Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef NEED_G_SLIST_FREE_FULL
+static inline void g_slist_free_full(GSList *list, GDestroyNotify free_func)
+{
+	g_slist_foreach(list, (GFunc) free_func, NULL);
+	g_slist_free(list);
+}
+#endif
diff --git a/src/glib-helper.c b/src/glib-helper.c
index 0288c9c..bb8883e 100644
--- a/src/glib-helper.c
+++ b/src/glib-helper.c
@@ -39,6 +39,7 @@
 
 #include "btio.h"
 #include "sdpd.h"
+#include "glib-compat.h"
 #include "glib-helper.h"
 
 /* Number of seconds to keep a sdp_session_t in the cache */
diff --git a/src/glib-helper.h b/src/glib-helper.h
index a383741..c83f5e2 100644
--- a/src/glib-helper.h
+++ b/src/glib-helper.h
@@ -34,11 +34,3 @@ char *bt_name2string(const char *string);
 int bt_string2uuid(uuid_t *uuid, const char *string);
 gchar *bt_list2string(GSList *list);
 GSList *bt_string2list(const gchar *str);
-
-#ifdef NEED_G_SLIST_FREE_FULL
-static inline void g_slist_free_full(GSList *list, GDestroyNotify free_func)
-{
-	g_slist_foreach(list, (GFunc) free_func, NULL);
-	g_slist_free(list);
-}
-#endif
diff --git a/src/storage.c b/src/storage.c
index c64842c..cc0213b 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -43,6 +43,7 @@
 #include <bluetooth/sdp_lib.h>
 
 #include "textfile.h"
+#include "glib-compat.h"
 #include "glib-helper.h"
 #include "storage.h"