bluez ver. bump
This commit is contained in:
@@ -66,7 +66,6 @@ def install():
|
||||
"monitor-bluetooth",
|
||||
"opp-client",
|
||||
"pbap-client",
|
||||
"sap_client.py",
|
||||
"simple-agent",
|
||||
"simple-endpoint",
|
||||
"simple-player",
|
||||
@@ -74,15 +73,18 @@ def install():
|
||||
"test-device",
|
||||
"test-discovery",
|
||||
"test-gatt-profile",
|
||||
"test-health",
|
||||
"test-health-sink",
|
||||
"test-hfp",
|
||||
"test-manager",
|
||||
"test-nap",
|
||||
"test-network",
|
||||
"test-profile",
|
||||
"test-sap-server"]:
|
||||
]:
|
||||
pisitools.dobin("test/%s" % i)
|
||||
# "test-sap-server"
|
||||
# "test-health-sink",
|
||||
# "test-health",
|
||||
# "sap_client.py",
|
||||
|
||||
# for i in
|
||||
# pisitools.dodoc("doc/%s" % i)
|
||||
# Install documents
|
||||
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001
|
||||
From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org>
|
||||
Date: Sat, 12 Oct 2013 17:45:25 +0200
|
||||
Subject: [PATCH] Allow using obexd without systemd in the user session
|
||||
|
||||
Not all sessions run systemd --user (actually, the majority
|
||||
doesn't), so the dbus daemon must be able to spawn obexd
|
||||
directly, and to do so it needs the full path of the daemon.
|
||||
---
|
||||
Makefile.obexd | 4 ++--
|
||||
obexd/src/org.bluez.obex.service | 4 ----
|
||||
obexd/src/org.bluez.obex.service.in | 4 ++++
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
delete mode 100644 obexd/src/org.bluez.obex.service
|
||||
create mode 100644 obexd/src/org.bluez.obex.service.in
|
||||
|
||||
diff --git a/Makefile.obexd b/Makefile.obexd
|
||||
index 3760867..142e7c3 100644
|
||||
--- a/Makefile.obexd
|
||||
+++ b/Makefile.obexd
|
||||
@@ -2,12 +2,12 @@
|
||||
if SYSTEMD
|
||||
systemduserunitdir = $(SYSTEMD_USERUNITDIR)
|
||||
systemduserunit_DATA = obexd/src/obex.service
|
||||
+endif
|
||||
|
||||
dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
|
||||
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
-endif
|
||||
|
||||
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
|
||||
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
|
||||
|
||||
obex_plugindir = $(libdir)/obex/plugins
|
||||
|
||||
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
|
||||
deleted file mode 100644
|
||||
index a538088..0000000
|
||||
--- a/obexd/src/org.bluez.obex.service
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-[D-BUS Service]
|
||||
-Name=org.bluez.obex
|
||||
-Exec=/bin/false
|
||||
-SystemdService=dbus-org.bluez.obex.service
|
||||
diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
|
||||
new file mode 100644
|
||||
index 0000000..9c815f2
|
||||
--- /dev/null
|
||||
+++ b/obexd/src/org.bluez.obex.service.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+[D-BUS Service]
|
||||
+Name=org.bluez.obex
|
||||
+Exec=@pkglibexecdir@/obexd
|
||||
+SystemdService=dbus-org.bluez.obex.service
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
https://github.com/bluez/bluez/issues/806
|
||||
https://bugs.gentoo.org/928417
|
||||
--- bluez-5.73.orig/Makefile.obexd 2024-04-02 10:38:48.743419656 +0200
|
||||
+++ bluez-5.73/Makefile.obexd 2024-04-02 10:40:53.300086281 +0200
|
||||
@@ -1,13 +1,13 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
if OBEX
|
||||
|
||||
+dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
|
||||
+dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
+
|
||||
if SYSTEMD
|
||||
systemduserunitdir = $(SYSTEMD_USERUNITDIR)
|
||||
systemduserunit_DATA = obexd/src/obex.service
|
||||
|
||||
-dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
|
||||
-dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
-
|
||||
obexd-add-service-symlink:
|
||||
$(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
--- a/Makefile.obexd
|
||||
+++ b/Makefile.obexd
|
||||
@@ -4,15 +4,14 @@
|
||||
if SYSTEMD
|
||||
systemduserunit_DATA += obexd/src/obex.service
|
||||
|
||||
-dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
|
||||
-dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
-
|
||||
obexd-add-service-symlink:
|
||||
$(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
|
||||
|
||||
obexd-remove-service-symlink:
|
||||
rm -f $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
|
||||
else
|
||||
+dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
|
||||
+dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
obexd-add-service-symlink:
|
||||
obexd-remove-service-symlink:
|
||||
endif
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001
|
||||
From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org>
|
||||
Date: Sat, 12 Oct 2013 17:45:25 +0200
|
||||
Subject: [PATCH] Allow using obexd without systemd in the user session
|
||||
|
||||
Not all sessions run systemd --user (actually, the majority
|
||||
doesn't), so the dbus daemon must be able to spawn obexd
|
||||
directly, and to do so it needs the full path of the daemon.
|
||||
---
|
||||
Makefile.obexd | 4 ++--
|
||||
obexd/src/org.bluez.obex.service | 4 ----
|
||||
obexd/src/org.bluez.obex.service.in | 4 ++++
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
delete mode 100644 obexd/src/org.bluez.obex.service
|
||||
create mode 100644 obexd/src/org.bluez.obex.service.in
|
||||
|
||||
diff --git a/Makefile.obexd b/Makefile.obexd
|
||||
index 3760867..142e7c3 100644
|
||||
--- a/Makefile.obexd
|
||||
+++ b/Makefile.obexd
|
||||
@@ -1,12 +1,13 @@
|
||||
if SYSTEMD
|
||||
systemduserunitdir = $(SYSTEMD_USERUNITDIR)
|
||||
systemduserunit_DATA = obexd/src/obex.service
|
||||
+endif
|
||||
|
||||
dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
|
||||
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
-endif
|
||||
|
||||
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
|
||||
+
|
||||
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
|
||||
|
||||
if OBEX
|
||||
|
||||
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
|
||||
deleted file mode 100644
|
||||
index a538088..0000000
|
||||
--- a/obexd/src/org.bluez.obex.service
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-[D-BUS Service]
|
||||
-Name=org.bluez.obex
|
||||
-Exec=/bin/false
|
||||
-SystemdService=dbus-org.bluez.obex.service
|
||||
diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
|
||||
new file mode 100644
|
||||
index 0000000..9c815f2
|
||||
--- /dev/null
|
||||
+++ b/obexd/src/org.bluez.obex.service.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+[D-BUS Service]
|
||||
+Name=org.bluez.obex
|
||||
+Exec=@libexecdir@/obexd
|
||||
+SystemdService=dbus-org.bluez.obex.service
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
From 90b72b787a6ae6b9b0bf8ece238e108e8607a433 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Sat, 9 Nov 2013 18:13:43 +0100
|
||||
Subject: [PATCH 1/2] obex: Use GLib helper function to manipulate paths
|
||||
|
||||
Instead of trying to do it by hand. This also makes sure that
|
||||
relative paths aren't used by the agent.
|
||||
---
|
||||
obexd/src/manager.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/obexd/src/manager.c b/obexd/src/manager.c
|
||||
index f84384ae4..285c07c37 100644
|
||||
--- a/obexd/src/manager.c
|
||||
+++ b/obexd/src/manager.c
|
||||
@@ -650,14 +650,14 @@ static void agent_reply(DBusPendingCall *call, void *user_data)
|
||||
DBUS_TYPE_STRING, &name,
|
||||
DBUS_TYPE_INVALID)) {
|
||||
/* Splits folder and name */
|
||||
- const char *slash = strrchr(name, '/');
|
||||
+ gboolean is_relative = !g_path_is_absolute(name);
|
||||
DBG("Agent replied with %s", name);
|
||||
- if (!slash) {
|
||||
- agent->new_name = g_strdup(name);
|
||||
+ if (is_relative) {
|
||||
+ agent->new_name = g_path_get_basename(name);
|
||||
agent->new_folder = NULL;
|
||||
} else {
|
||||
- agent->new_name = g_strdup(slash + 1);
|
||||
- agent->new_folder = g_strndup(name, slash - name);
|
||||
+ agent->new_name = g_path_get_basename(name);
|
||||
+ agent->new_folder = g_path_get_dirname(name);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.14.1
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
From 382646b490c1c336dd32f9186293616ceb4d808b Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Berg <bberg@redhat.com>
|
||||
Date: Mon, 3 May 2021 14:45:00 +0200
|
||||
Subject: [PATCH 1/2] rfkill: Fix reading from rfkill socket
|
||||
|
||||
The kernel will always send exactly one event, but the size of the
|
||||
passed struct will depend on the length of the submitted read() and the
|
||||
kernel version. i.e. the interface can be extended and we need to expect
|
||||
for a read to be longer than expected if we ask for it.
|
||||
|
||||
Fix this by only requesting the needed length and explicitly check the
|
||||
length against the V1 version of the structure to make the code a bit
|
||||
more future proof in case the internal copy of the struct is updated to
|
||||
contain new fields.
|
||||
---
|
||||
src/rfkill.c | 24 +++++++++++-------------
|
||||
1 file changed, 11 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/rfkill.c b/src/rfkill.c
|
||||
index ec9fcdfdd..2099c5ac5 100644
|
||||
--- a/src/rfkill.c
|
||||
+++ b/src/rfkill.c
|
||||
@@ -53,12 +53,12 @@ struct rfkill_event {
|
||||
uint8_t soft;
|
||||
uint8_t hard;
|
||||
};
|
||||
+#define RFKILL_EVENT_SIZE_V1 8
|
||||
|
||||
static gboolean rfkill_event(GIOChannel *chan,
|
||||
GIOCondition cond, gpointer data)
|
||||
{
|
||||
- unsigned char buf[32];
|
||||
- struct rfkill_event *event = (void *) buf;
|
||||
+ struct rfkill_event event = { 0 };
|
||||
struct btd_adapter *adapter;
|
||||
char sysname[PATH_MAX];
|
||||
ssize_t len;
|
||||
@@ -69,34 +69,32 @@ static gboolean rfkill_event(GIOChannel *chan,
|
||||
|
||||
fd = g_io_channel_unix_get_fd(chan);
|
||||
|
||||
- memset(buf, 0, sizeof(buf));
|
||||
-
|
||||
- len = read(fd, buf, sizeof(buf));
|
||||
+ len = read(fd, &event, sizeof(event));
|
||||
if (len < 0) {
|
||||
if (errno == EAGAIN)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- if (len != sizeof(struct rfkill_event))
|
||||
+ if (len < RFKILL_EVENT_SIZE_V1)
|
||||
return TRUE;
|
||||
|
||||
DBG("RFKILL event idx %u type %u op %u soft %u hard %u",
|
||||
- event->idx, event->type, event->op,
|
||||
- event->soft, event->hard);
|
||||
+ event.idx, event.type, event.op,
|
||||
+ event.soft, event.hard);
|
||||
|
||||
- if (event->soft || event->hard)
|
||||
+ if (event.soft || event.hard)
|
||||
return TRUE;
|
||||
|
||||
- if (event->op != RFKILL_OP_CHANGE)
|
||||
+ if (event.op != RFKILL_OP_CHANGE)
|
||||
return TRUE;
|
||||
|
||||
- if (event->type != RFKILL_TYPE_BLUETOOTH &&
|
||||
- event->type != RFKILL_TYPE_ALL)
|
||||
+ if (event.type != RFKILL_TYPE_BLUETOOTH &&
|
||||
+ event.type != RFKILL_TYPE_ALL)
|
||||
return TRUE;
|
||||
|
||||
snprintf(sysname, sizeof(sysname) - 1,
|
||||
- "/sys/class/rfkill/rfkill%u/name", event->idx);
|
||||
+ "/sys/class/rfkill/rfkill%u/name", event.idx);
|
||||
|
||||
fd = open(sysname, O_RDONLY);
|
||||
if (fd < 0)
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -1,997 +0,0 @@
|
||||
From 393a58bbe5174123ee9d52c03a75b08219642024 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Berg <bberg@redhat.com>
|
||||
Date: Mon, 3 May 2021 15:06:36 +0200
|
||||
Subject: [PATCH] Use g_memdup2 everywhere
|
||||
|
||||
---
|
||||
android/a2dp.c | 8 ++---
|
||||
android/avctp.c | 4 +--
|
||||
android/avrcp-lib.c | 2 +-
|
||||
android/gatt.c | 4 +--
|
||||
android/hidhost.c | 2 +-
|
||||
android/tester-main.c | 70 +++++++++++++++++++-------------------
|
||||
attrib/gatt.c | 6 ++--
|
||||
client/gatt.c | 2 +-
|
||||
gobex/gobex-header.c | 4 +--
|
||||
gobex/gobex-packet.c | 2 +-
|
||||
obexd/src/obex.c | 2 +-
|
||||
plugins/neard.c | 6 ++--
|
||||
plugins/policy.c | 4 +--
|
||||
profiles/audio/avctp.c | 4 +--
|
||||
profiles/audio/avrcp.c | 6 ++--
|
||||
profiles/battery/bas.c | 2 +-
|
||||
profiles/battery/battery.c | 2 +-
|
||||
profiles/deviceinfo/dis.c | 2 +-
|
||||
profiles/input/hog-lib.c | 6 ++--
|
||||
profiles/scanparam/scpp.c | 2 +-
|
||||
src/attrib-server.c | 2 +-
|
||||
src/eir.c | 4 +--
|
||||
tools/gatt-service.c | 6 ++--
|
||||
tools/mesh-gatt/gatt.c | 2 +-
|
||||
unit/test-avctp.c | 4 +--
|
||||
unit/test-avdtp.c | 6 ++--
|
||||
unit/test-avrcp.c | 10 +++---
|
||||
unit/test-gatt.c | 4 +--
|
||||
unit/test-hfp.c | 10 +++---
|
||||
unit/test-hog.c | 4 +--
|
||||
unit/test-sdp.c | 8 ++---
|
||||
unit/test-uhid.c | 2 +-
|
||||
32 files changed, 101 insertions(+), 101 deletions(-)
|
||||
|
||||
diff --git a/android/a2dp.c b/android/a2dp.c
|
||||
index e24f793..1d9538a 100644
|
||||
--- a/android/a2dp.c
|
||||
+++ b/android/a2dp.c
|
||||
@@ -428,7 +428,7 @@ static struct a2dp_preset *sbc_select_range(void *caps, uint8_t caps_len,
|
||||
|
||||
p = g_new0(struct a2dp_preset, 1);
|
||||
p->len = conf_len;
|
||||
- p->data = g_memdup(conf, p->len);
|
||||
+ p->data = g_memdup2(conf, p->len);
|
||||
|
||||
return p;
|
||||
}
|
||||
@@ -448,7 +448,7 @@ static struct a2dp_preset *aac_select_range(void *caps, uint8_t caps_len,
|
||||
|
||||
p = g_new0(struct a2dp_preset, 1);
|
||||
p->len = conf_len;
|
||||
- p->data = g_memdup(conf, p->len);
|
||||
+ p->data = g_memdup2(conf, p->len);
|
||||
|
||||
return p;
|
||||
}
|
||||
@@ -1036,7 +1036,7 @@ static gboolean sep_setconf_ind(struct avdtp *session,
|
||||
|
||||
preset = g_new0(struct a2dp_preset, 1);
|
||||
preset->len = cap->length - sizeof(*codec);
|
||||
- preset->data = g_memdup(codec->data, preset->len);
|
||||
+ preset->data = g_memdup2(codec->data, preset->len);
|
||||
|
||||
if (check_config(endpoint, preset) < 0) {
|
||||
preset_free(preset);
|
||||
@@ -1365,7 +1365,7 @@ static GSList *parse_presets(const struct audio_preset *p, uint8_t count,
|
||||
|
||||
preset = g_new0(struct a2dp_preset, 1);
|
||||
preset->len = p->len;
|
||||
- preset->data = g_memdup(p->data, preset->len);
|
||||
+ preset->data = g_memdup2(p->data, preset->len);
|
||||
l = g_slist_append(l, preset);
|
||||
|
||||
len -= preset->len;
|
||||
diff --git a/android/avctp.c b/android/avctp.c
|
||||
index c2ea5f4..d1b8fe3 100644
|
||||
--- a/android/avctp.c
|
||||
+++ b/android/avctp.c
|
||||
@@ -1179,7 +1179,7 @@ static int avctp_send_req(struct avctp *session, uint8_t code, uint8_t subunit,
|
||||
|
||||
for (i = 0; i < iov_cnt; i++) {
|
||||
pdu[i].iov_len = iov[i].iov_len;
|
||||
- pdu[i].iov_base = g_memdup(iov[i].iov_base, iov[i].iov_len);
|
||||
+ pdu[i].iov_base = g_memdup2(iov[i].iov_base, iov[i].iov_len);
|
||||
}
|
||||
|
||||
req = g_new0(struct avctp_control_req, 1);
|
||||
@@ -1220,7 +1220,7 @@ int avctp_send_browsing_req(struct avctp *session,
|
||||
|
||||
for (i = 0; i < iov_cnt; i++) {
|
||||
pdu[i].iov_len = iov[i].iov_len;
|
||||
- pdu[i].iov_base = g_memdup(iov[i].iov_base, iov[i].iov_len);
|
||||
+ pdu[i].iov_base = g_memdup2(iov[i].iov_base, iov[i].iov_len);
|
||||
}
|
||||
|
||||
req = g_new0(struct avctp_browsing_req, 1);
|
||||
diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c
|
||||
index 2007d09..ededdcf 100644
|
||||
--- a/android/avrcp-lib.c
|
||||
+++ b/android/avrcp-lib.c
|
||||
@@ -2620,7 +2620,7 @@ static char *parse_folder_list(uint8_t *params, uint16_t params_len,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- folders[count] = g_memdup(¶ms[i], len);
|
||||
+ folders[count] = g_memdup2(¶ms[i], len);
|
||||
i += len;
|
||||
}
|
||||
|
||||
diff --git a/android/gatt.c b/android/gatt.c
|
||||
index a8a0c48..6e8c431 100644
|
||||
--- a/android/gatt.c
|
||||
+++ b/android/gatt.c
|
||||
@@ -1338,7 +1338,7 @@ static void discover_primary_cb(uint8_t status, GSList *services,
|
||||
}
|
||||
|
||||
bt_uuid_to_uuid128(&uuid, &u128);
|
||||
- new_uuid = g_memdup(&u128.value.u128, sizeof(u128.value.u128));
|
||||
+ new_uuid = g_memdup2(&u128.value.u128, sizeof(u128.value.u128));
|
||||
|
||||
uuids = g_slist_prepend(uuids, new_uuid);
|
||||
}
|
||||
@@ -6633,7 +6633,7 @@ static uint8_t write_prep_request(const uint8_t *cmd, uint16_t cmd_len,
|
||||
|
||||
queue_push_tail(dev->pending_requests, data);
|
||||
|
||||
- data->value = g_memdup(value, vlen);
|
||||
+ data->value = g_memdup2(value, vlen);
|
||||
data->length = vlen;
|
||||
|
||||
if (!gatt_db_attribute_write(attrib, offset, value, vlen, cmd[0],
|
||||
diff --git a/android/hidhost.c b/android/hidhost.c
|
||||
index 016382e..6f0ec85 100644
|
||||
--- a/android/hidhost.c
|
||||
+++ b/android/hidhost.c
|
||||
@@ -689,7 +689,7 @@ static void hid_sdp_search_cb(sdp_list_t *recs, int err, gpointer data)
|
||||
goto fail;
|
||||
|
||||
dev->rd_size = data->unitSize;
|
||||
- dev->rd_data = g_memdup(data->val.str, data->unitSize);
|
||||
+ dev->rd_data = g_memdup2(data->val.str, data->unitSize);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/android/tester-main.c b/android/tester-main.c
|
||||
index 2bfa770..c09bc0a 100644
|
||||
--- a/android/tester-main.c
|
||||
+++ b/android/tester-main.c
|
||||
@@ -1253,7 +1253,7 @@ static bt_property_t *copy_properties(int num_properties,
|
||||
for (i = 0; i < num_properties; i++) {
|
||||
props[i].type = properties[i].type;
|
||||
props[i].len = properties[i].len;
|
||||
- props[i].val = g_memdup(properties[i].val, properties[i].len);
|
||||
+ props[i].val = g_memdup2(properties[i].val, properties[i].len);
|
||||
}
|
||||
|
||||
return props;
|
||||
@@ -1268,7 +1268,7 @@ static bt_property_t *repack_properties(int num_properties,
|
||||
for (i = 0; i < num_properties; i++) {
|
||||
props[i].type = properties[i]->type;
|
||||
props[i].len = properties[i]->len;
|
||||
- props[i].val = g_memdup(properties[i]->val, properties[i]->len);
|
||||
+ props[i].val = g_memdup2(properties[i]->val, properties[i]->len);
|
||||
}
|
||||
|
||||
return props;
|
||||
@@ -1281,7 +1281,7 @@ static bt_property_t *create_property(bt_property_type_t type, void *val,
|
||||
|
||||
prop->type = type;
|
||||
prop->len = len;
|
||||
- prop->val = g_memdup(val, len);
|
||||
+ prop->val = g_memdup2(val, len);
|
||||
|
||||
return prop;
|
||||
}
|
||||
@@ -1615,7 +1615,7 @@ static void gattc_search_result_cb(int conn_id, btgatt_srvc_id_t *srvc_id)
|
||||
|
||||
step->callback = CB_GATTC_SEARCH_RESULT;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.service = g_memdup(srvc_id, sizeof(*srvc_id));
|
||||
+ step->callback_result.service = g_memdup2(srvc_id, sizeof(*srvc_id));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
}
|
||||
@@ -1639,8 +1639,8 @@ static void gattc_get_characteristic_cb(int conn_id, int status,
|
||||
step->callback = CB_GATTC_GET_CHARACTERISTIC;
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.service = g_memdup(srvc_id, sizeof(*srvc_id));
|
||||
- step->callback_result.characteristic = g_memdup(char_id,
|
||||
+ step->callback_result.service = g_memdup2(srvc_id, sizeof(*srvc_id));
|
||||
+ step->callback_result.characteristic = g_memdup2(char_id,
|
||||
sizeof(*char_id));
|
||||
step->callback_result.char_prop = char_prop;
|
||||
|
||||
@@ -1656,10 +1656,10 @@ static void gattc_get_descriptor_cb(int conn_id, int status,
|
||||
step->callback = CB_GATTC_GET_DESCRIPTOR;
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.service = g_memdup(srvc_id, sizeof(*srvc_id));
|
||||
- step->callback_result.characteristic = g_memdup(char_id,
|
||||
+ step->callback_result.service = g_memdup2(srvc_id, sizeof(*srvc_id));
|
||||
+ step->callback_result.characteristic = g_memdup2(char_id,
|
||||
sizeof(*char_id));
|
||||
- step->callback_result.descriptor = g_memdup(descr_id,
|
||||
+ step->callback_result.descriptor = g_memdup2(descr_id,
|
||||
sizeof(*descr_id));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1673,8 +1673,8 @@ static void gattc_get_included_service_cb(int conn_id, int status,
|
||||
step->callback = CB_GATTC_GET_INCLUDED_SERVICE;
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.service = g_memdup(srvc_id, sizeof(*srvc_id));
|
||||
- step->callback_result.included = g_memdup(incl_srvc_id,
|
||||
+ step->callback_result.service = g_memdup2(srvc_id, sizeof(*srvc_id));
|
||||
+ step->callback_result.included = g_memdup2(incl_srvc_id,
|
||||
sizeof(*srvc_id));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1688,7 +1688,7 @@ static void gattc_read_characteristic_cb(int conn_id, int status,
|
||||
step->callback = CB_GATTC_READ_CHARACTERISTIC;
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.read_params = g_memdup(p_data, sizeof(*p_data));
|
||||
+ step->callback_result.read_params = g_memdup2(p_data, sizeof(*p_data));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
}
|
||||
@@ -1701,7 +1701,7 @@ static void gattc_read_descriptor_cb(int conn_id, int status,
|
||||
step->callback = CB_GATTC_READ_DESCRIPTOR;
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.read_params = g_memdup(p_data, sizeof(*p_data));
|
||||
+ step->callback_result.read_params = g_memdup2(p_data, sizeof(*p_data));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
}
|
||||
@@ -1714,7 +1714,7 @@ static void gattc_write_characteristic_cb(int conn_id, int status,
|
||||
step->callback = CB_GATTC_WRITE_CHARACTERISTIC;
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.write_params = g_memdup(p_data, sizeof(*p_data));
|
||||
+ step->callback_result.write_params = g_memdup2(p_data, sizeof(*p_data));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
}
|
||||
@@ -1727,7 +1727,7 @@ static void gattc_write_descriptor_cb(int conn_id, int status,
|
||||
step->callback = CB_GATTC_WRITE_DESCRIPTOR;
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.write_params = g_memdup(p_data, sizeof(*p_data));
|
||||
+ step->callback_result.write_params = g_memdup2(p_data, sizeof(*p_data));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
}
|
||||
@@ -1742,8 +1742,8 @@ static void gattc_register_for_notification_cb(int conn_id, int registered,
|
||||
step->callback = CB_GATTC_REGISTER_FOR_NOTIFICATION;
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.service = g_memdup(srvc_id, sizeof(*srvc_id));
|
||||
- step->callback_result.characteristic = g_memdup(char_id,
|
||||
+ step->callback_result.service = g_memdup2(srvc_id, sizeof(*srvc_id));
|
||||
+ step->callback_result.characteristic = g_memdup2(char_id,
|
||||
sizeof(*char_id));
|
||||
step->callback_result.notification_registered = registered;
|
||||
|
||||
@@ -1756,7 +1756,7 @@ static void gattc_notif_cb(int conn_id, btgatt_notify_params_t *p_data)
|
||||
|
||||
step->callback = CB_GATTC_NOTIFY;
|
||||
step->callback_result.conn_id = conn_id;
|
||||
- step->callback_result.notify_params = g_memdup(p_data, sizeof(*p_data));
|
||||
+ step->callback_result.notify_params = g_memdup2(p_data, sizeof(*p_data));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
}
|
||||
@@ -1827,8 +1827,8 @@ static void gatts_service_added_cb(int status, int server_if,
|
||||
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.gatt_app_id = server_if;
|
||||
- step->callback_result.service = g_memdup(srvc_id, sizeof(*srvc_id));
|
||||
- step->callback_result.srvc_handle = g_memdup(&srvc_handle,
|
||||
+ step->callback_result.service = g_memdup2(srvc_id, sizeof(*srvc_id));
|
||||
+ step->callback_result.srvc_handle = g_memdup2(&srvc_handle,
|
||||
sizeof(srvc_handle));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1844,9 +1844,9 @@ static void gatts_included_service_added_cb(int status, int server_if,
|
||||
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.gatt_app_id = server_if;
|
||||
- step->callback_result.srvc_handle = g_memdup(&srvc_handle,
|
||||
+ step->callback_result.srvc_handle = g_memdup2(&srvc_handle,
|
||||
sizeof(srvc_handle));
|
||||
- step->callback_result.inc_srvc_handle = g_memdup(&inc_srvc_handle,
|
||||
+ step->callback_result.inc_srvc_handle = g_memdup2(&inc_srvc_handle,
|
||||
sizeof(inc_srvc_handle));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1863,10 +1863,10 @@ static void gatts_characteristic_added_cb(int status, int server_if,
|
||||
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.gatt_app_id = server_if;
|
||||
- step->callback_result.srvc_handle = g_memdup(&srvc_handle,
|
||||
+ step->callback_result.srvc_handle = g_memdup2(&srvc_handle,
|
||||
sizeof(srvc_handle));
|
||||
- step->callback_result.uuid = g_memdup(uuid, sizeof(*uuid));
|
||||
- step->callback_result.char_handle = g_memdup(&char_handle,
|
||||
+ step->callback_result.uuid = g_memdup2(uuid, sizeof(*uuid));
|
||||
+ step->callback_result.char_handle = g_memdup2(&char_handle,
|
||||
sizeof(char_handle));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1883,10 +1883,10 @@ static void gatts_descriptor_added_cb(int status, int server_if,
|
||||
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.gatt_app_id = server_if;
|
||||
- step->callback_result.srvc_handle = g_memdup(&srvc_handle,
|
||||
+ step->callback_result.srvc_handle = g_memdup2(&srvc_handle,
|
||||
sizeof(srvc_handle));
|
||||
- step->callback_result.uuid = g_memdup(uuid, sizeof(*uuid));
|
||||
- step->callback_result.desc_handle = g_memdup(&desc_handle,
|
||||
+ step->callback_result.uuid = g_memdup2(uuid, sizeof(*uuid));
|
||||
+ step->callback_result.desc_handle = g_memdup2(&desc_handle,
|
||||
sizeof(desc_handle));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1900,7 +1900,7 @@ static void gatts_service_started_cb(int status, int server_if, int srvc_handle)
|
||||
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.gatt_app_id = server_if;
|
||||
- step->callback_result.srvc_handle = g_memdup(&srvc_handle,
|
||||
+ step->callback_result.srvc_handle = g_memdup2(&srvc_handle,
|
||||
sizeof(srvc_handle));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1914,7 +1914,7 @@ static void gatts_service_stopped_cb(int status, int server_if, int srvc_handle)
|
||||
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.gatt_app_id = server_if;
|
||||
- step->callback_result.srvc_handle = g_memdup(&srvc_handle,
|
||||
+ step->callback_result.srvc_handle = g_memdup2(&srvc_handle,
|
||||
sizeof(srvc_handle));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1928,7 +1928,7 @@ static void gatts_service_deleted_cb(int status, int server_if, int srvc_handle)
|
||||
|
||||
step->callback_result.status = status;
|
||||
step->callback_result.gatt_app_id = server_if;
|
||||
- step->callback_result.srvc_handle = g_memdup(&srvc_handle,
|
||||
+ step->callback_result.srvc_handle = g_memdup2(&srvc_handle,
|
||||
sizeof(srvc_handle));
|
||||
|
||||
schedule_callback_verification(step);
|
||||
@@ -1945,7 +1945,7 @@ static void gatts_request_read_cb(int conn_id, int trans_id, bt_bdaddr_t *bda,
|
||||
|
||||
step->callback_result.conn_id = conn_id;
|
||||
step->callback_result.trans_id = trans_id;
|
||||
- step->callback_result.attr_handle = g_memdup(&attr_handle,
|
||||
+ step->callback_result.attr_handle = g_memdup2(&attr_handle,
|
||||
sizeof(attr_handle));
|
||||
step->callback_result.offset = offset;
|
||||
step->callback_result.is_long = is_long;
|
||||
@@ -1974,13 +1974,13 @@ static void gatts_request_write_cb(int conn_id, int trans_id, bt_bdaddr_t *bda,
|
||||
|
||||
step->callback_result.conn_id = conn_id;
|
||||
step->callback_result.trans_id = trans_id;
|
||||
- step->callback_result.attr_handle = g_memdup(&attr_handle,
|
||||
+ step->callback_result.attr_handle = g_memdup2(&attr_handle,
|
||||
sizeof(attr_handle));
|
||||
step->callback_result.offset = offset;
|
||||
step->callback_result.length = length;
|
||||
step->callback_result.need_rsp = need_rsp;
|
||||
step->callback_result.is_prep = is_prep;
|
||||
- step->callback_result.value = g_memdup(&value, length);
|
||||
+ step->callback_result.value = g_memdup2(&value, length);
|
||||
|
||||
/* Utilize property verification mechanism for bdaddr */
|
||||
props[0] = create_property(BT_PROPERTY_BDADDR, bda, sizeof(*bda));
|
||||
@@ -2169,7 +2169,7 @@ static btmce_mas_instance_t *copy_mas_instances(int num_instances,
|
||||
inst[i].id = instances[i].id;
|
||||
inst[i].scn = instances[i].scn;
|
||||
inst[i].msg_types = instances[i].msg_types;
|
||||
- inst[i].p_name = g_memdup(instances[i].p_name,
|
||||
+ inst[i].p_name = g_memdup2(instances[i].p_name,
|
||||
strlen(instances[i].p_name));
|
||||
}
|
||||
|
||||
diff --git a/attrib/gatt.c b/attrib/gatt.c
|
||||
index 46b2ca3..1f30764 100644
|
||||
--- a/attrib/gatt.c
|
||||
+++ b/attrib/gatt.c
|
||||
@@ -696,7 +696,7 @@ guint gatt_discover_char(GAttrib *attrib, uint16_t start, uint16_t end,
|
||||
dc->user_data = user_data;
|
||||
dc->end = end;
|
||||
dc->start = start;
|
||||
- dc->uuid = g_memdup(uuid, sizeof(bt_uuid_t));
|
||||
+ dc->uuid = g_memdup2(uuid, sizeof(bt_uuid_t));
|
||||
|
||||
dc->id = g_attrib_send(attrib, 0, buf, plen, char_discovered_cb,
|
||||
discover_char_ref(dc), discover_char_unref);
|
||||
@@ -964,7 +964,7 @@ guint gatt_write_char(GAttrib *attrib, uint16_t handle, const uint8_t *value,
|
||||
long_write->func = func;
|
||||
long_write->user_data = user_data;
|
||||
long_write->handle = handle;
|
||||
- long_write->value = g_memdup(value, vlen);
|
||||
+ long_write->value = g_memdup2(value, vlen);
|
||||
long_write->vlen = vlen;
|
||||
|
||||
return prepare_write(long_write);
|
||||
@@ -1130,7 +1130,7 @@ guint gatt_discover_desc(GAttrib *attrib, uint16_t start, uint16_t end,
|
||||
dd->user_data = user_data;
|
||||
dd->start = start;
|
||||
dd->end = end;
|
||||
- dd->uuid = g_memdup(uuid, sizeof(bt_uuid_t));
|
||||
+ dd->uuid = g_memdup2(uuid, sizeof(bt_uuid_t));
|
||||
|
||||
dd->id = g_attrib_send(attrib, 0, buf, plen, desc_discovered_cb,
|
||||
discover_desc_ref(dd), discover_desc_unref);
|
||||
diff --git a/client/gatt.c b/client/gatt.c
|
||||
index 21fd38e..d302183 100644
|
||||
--- a/client/gatt.c
|
||||
+++ b/client/gatt.c
|
||||
@@ -790,7 +790,7 @@ static uint8_t *str2bytearray(char *arg, size_t *val_len)
|
||||
|
||||
*val_len = i;
|
||||
|
||||
- return g_memdup(value, i);
|
||||
+ return g_memdup2(value, i);
|
||||
}
|
||||
|
||||
void gatt_write_attribute(GDBusProxy *proxy, int argc, char *argv[])
|
||||
diff --git a/gobex/gobex-header.c b/gobex/gobex-header.c
|
||||
index 011d33d..c56be2f 100644
|
||||
--- a/gobex/gobex-header.c
|
||||
+++ b/gobex/gobex-header.c
|
||||
@@ -222,7 +222,7 @@ GObexHeader *g_obex_header_decode(const void *data, gsize len,
|
||||
|
||||
switch (data_policy) {
|
||||
case G_OBEX_DATA_COPY:
|
||||
- header->v.data = g_memdup(ptr, header->vlen);
|
||||
+ header->v.data = g_memdup2(ptr, header->vlen);
|
||||
break;
|
||||
case G_OBEX_DATA_REF:
|
||||
header->extdata = TRUE;
|
||||
@@ -410,7 +410,7 @@ GObexHeader *g_obex_header_new_bytes(guint8 id, const void *data, gsize len)
|
||||
header->id = id;
|
||||
header->vlen = len;
|
||||
header->hlen = len + 3;
|
||||
- header->v.data = g_memdup(data, len);
|
||||
+ header->v.data = g_memdup2(data, len);
|
||||
|
||||
return header;
|
||||
}
|
||||
diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c
|
||||
index 11937a5..18da6ea 100644
|
||||
--- a/gobex/gobex-packet.c
|
||||
+++ b/gobex/gobex-packet.c
|
||||
@@ -201,7 +201,7 @@ gboolean g_obex_packet_set_data(GObexPacket *pkt, const void *data, gsize len,
|
||||
|
||||
switch (data_policy) {
|
||||
case G_OBEX_DATA_COPY:
|
||||
- pkt->data.buf = g_memdup(data, len);
|
||||
+ pkt->data.buf = g_memdup2(data, len);
|
||||
break;
|
||||
case G_OBEX_DATA_REF:
|
||||
pkt->data.buf_ref = data;
|
||||
diff --git a/obexd/src/obex.c b/obexd/src/obex.c
|
||||
index 9f992ec..151d956 100644
|
||||
--- a/obexd/src/obex.c
|
||||
+++ b/obexd/src/obex.c
|
||||
@@ -594,7 +594,7 @@ static void parse_apparam(struct obex_session *os, GObexPacket *req)
|
||||
if (!g_obex_header_get_bytes(hdr, &apparam, &len))
|
||||
return;
|
||||
|
||||
- os->apparam = g_memdup(apparam, len);
|
||||
+ os->apparam = g_memdup2(apparam, len);
|
||||
os->apparam_len = len;
|
||||
DBG("APPARAM");
|
||||
}
|
||||
diff --git a/plugins/neard.c b/plugins/neard.c
|
||||
index e07b511..a806bb7 100644
|
||||
--- a/plugins/neard.c
|
||||
+++ b/plugins/neard.c
|
||||
@@ -407,10 +407,10 @@ static int process_nokia_long (void *data, size_t size, uint8_t marker,
|
||||
remote->name = g_strndup((char *)n->name, n->name_len);
|
||||
|
||||
if (marker == 0x01) {
|
||||
- remote->pin = g_memdup(n->authentication, 4);
|
||||
+ remote->pin = g_memdup2(n->authentication, 4);
|
||||
remote->pin_len = 4;
|
||||
} else if (marker == 0x02) {
|
||||
- remote->pin = g_memdup(n->authentication, 16);
|
||||
+ remote->pin = g_memdup2(n->authentication, 16);
|
||||
remote->pin_len = 16;
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ static int process_nokia_short (void *data, size_t size,
|
||||
if (n->name_len > 0)
|
||||
remote->name = g_strndup((char *)n->name, n->name_len);
|
||||
|
||||
- remote->pin = g_memdup(n->authentication, 4);
|
||||
+ remote->pin = g_memdup2(n->authentication, 4);
|
||||
remote->pin_len = 4;
|
||||
|
||||
return 0;
|
||||
diff --git a/plugins/policy.c b/plugins/policy.c
|
||||
index bf93df0..79943fc 100644
|
||||
--- a/plugins/policy.c
|
||||
+++ b/plugins/policy.c
|
||||
@@ -855,7 +855,7 @@ static int policy_init(void)
|
||||
reconnect_attempts = default_attempts;
|
||||
reconnect_intervals_len = sizeof(default_intervals) /
|
||||
sizeof(*reconnect_intervals);
|
||||
- reconnect_intervals = g_memdup(default_intervals,
|
||||
+ reconnect_intervals = g_memdup2(default_intervals,
|
||||
sizeof(default_intervals));
|
||||
goto done;
|
||||
}
|
||||
@@ -886,7 +886,7 @@ static int policy_init(void)
|
||||
g_clear_error(&gerr);
|
||||
reconnect_intervals_len = sizeof(default_intervals) /
|
||||
sizeof(*reconnect_intervals);
|
||||
- reconnect_intervals = g_memdup(default_intervals,
|
||||
+ reconnect_intervals = g_memdup2(default_intervals,
|
||||
sizeof(default_intervals));
|
||||
}
|
||||
|
||||
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
|
||||
index 50de336..2733a76 100644
|
||||
--- a/profiles/audio/avctp.c
|
||||
+++ b/profiles/audio/avctp.c
|
||||
@@ -1731,7 +1731,7 @@ static int avctp_send_req(struct avctp *session, uint8_t code,
|
||||
req->subunit = subunit;
|
||||
req->op = opcode;
|
||||
req->func = func;
|
||||
- req->operands = g_memdup(operands, operand_count);
|
||||
+ req->operands = g_memdup2(operands, operand_count);
|
||||
req->operand_count = operand_count;
|
||||
req->user_data = user_data;
|
||||
|
||||
@@ -1769,7 +1769,7 @@ int avctp_send_browsing_req(struct avctp *session,
|
||||
|
||||
req = g_new0(struct avctp_browsing_req, 1);
|
||||
req->func = func;
|
||||
- req->operands = g_memdup(operands, operand_count);
|
||||
+ req->operands = g_memdup2(operands, operand_count);
|
||||
req->operand_count = operand_count;
|
||||
req->user_data = user_data;
|
||||
|
||||
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
|
||||
index 05dd791..e23228d 100644
|
||||
--- a/profiles/audio/avrcp.c
|
||||
+++ b/profiles/audio/avrcp.c
|
||||
@@ -1297,7 +1297,7 @@ static uint8_t avrcp_handle_get_current_player_value(struct avrcp *session,
|
||||
* Save a copy of requested settings because we can override them
|
||||
* while responding
|
||||
*/
|
||||
- settings = g_memdup(&pdu->params[1], pdu->params[0]);
|
||||
+ settings = g_memdup2(&pdu->params[1], pdu->params[0]);
|
||||
len = 0;
|
||||
|
||||
/*
|
||||
@@ -2786,7 +2786,7 @@ static gboolean avrcp_set_browsed_player_rsp(struct avctp *conn,
|
||||
break;
|
||||
}
|
||||
|
||||
- folders[count] = g_memdup(&pdu->params[i], len);
|
||||
+ folders[count] = g_memdup2(&pdu->params[i], len);
|
||||
i += len;
|
||||
}
|
||||
|
||||
@@ -2873,7 +2873,7 @@ static void avrcp_player_parse_features(struct avrcp_player *player,
|
||||
{
|
||||
struct media_player *mp = player->user_data;
|
||||
|
||||
- player->features = g_memdup(features, 16);
|
||||
+ player->features = g_memdup2(features, 16);
|
||||
|
||||
if (features[7] & 0x08) {
|
||||
media_player_set_browsable(mp, true);
|
||||
diff --git a/profiles/battery/bas.c b/profiles/battery/bas.c
|
||||
index 3c6173b..b223fbe 100644
|
||||
--- a/profiles/battery/bas.c
|
||||
+++ b/profiles/battery/bas.c
|
||||
@@ -75,7 +75,7 @@ struct bt_bas *bt_bas_new(void *primary)
|
||||
bas->gatt_op = queue_new();
|
||||
|
||||
if (primary)
|
||||
- bas->primary = g_memdup(primary, sizeof(*bas->primary));
|
||||
+ bas->primary = g_memdup2(primary, sizeof(*bas->primary));
|
||||
|
||||
return bt_bas_ref(bas);
|
||||
}
|
||||
diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
|
||||
index 176d127..3b5aa5c 100644
|
||||
--- a/profiles/battery/battery.c
|
||||
+++ b/profiles/battery/battery.c
|
||||
@@ -159,7 +159,7 @@ static void read_initial_battery_level_cb(bool success,
|
||||
if (!length)
|
||||
return;
|
||||
|
||||
- batt->initial_value = g_memdup(value, length);
|
||||
+ batt->initial_value = g_memdup2(value, length);
|
||||
|
||||
/* request notify */
|
||||
batt->batt_level_cb_id =
|
||||
diff --git a/profiles/deviceinfo/dis.c b/profiles/deviceinfo/dis.c
|
||||
index 87fa633..79d98c3 100644
|
||||
--- a/profiles/deviceinfo/dis.c
|
||||
+++ b/profiles/deviceinfo/dis.c
|
||||
@@ -143,7 +143,7 @@ struct bt_dis *bt_dis_new_primary(void *primary)
|
||||
dis->gatt_op = queue_new();
|
||||
|
||||
if (primary)
|
||||
- dis->primary = g_memdup(primary, sizeof(*dis->primary));
|
||||
+ dis->primary = g_memdup2(primary, sizeof(*dis->primary));
|
||||
|
||||
return bt_dis_ref(dis);
|
||||
}
|
||||
diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
|
||||
index e5e3d3e..3652bdf 100644
|
||||
--- a/profiles/input/hog-lib.c
|
||||
+++ b/profiles/input/hog-lib.c
|
||||
@@ -514,7 +514,7 @@ static void report_read_cb(guint8 status, const guint8 *pdu, guint16 len,
|
||||
if (report->value)
|
||||
g_free(report->value);
|
||||
|
||||
- report->value = g_memdup(pdu, len);
|
||||
+ report->value = g_memdup2(pdu, len);
|
||||
report->len = len;
|
||||
}
|
||||
|
||||
@@ -1595,7 +1595,7 @@ static void hog_attach_hog(struct bt_hog *hog, struct gatt_primary *primary)
|
||||
struct bt_hog *instance;
|
||||
|
||||
if (!hog->primary) {
|
||||
- hog->primary = g_memdup(primary, sizeof(*primary));
|
||||
+ hog->primary = g_memdup2(primary, sizeof(*primary));
|
||||
discover_char(hog, hog->attrib, primary->range.start,
|
||||
primary->range.end, NULL,
|
||||
char_discovered_cb, hog);
|
||||
@@ -1609,7 +1609,7 @@ static void hog_attach_hog(struct bt_hog *hog, struct gatt_primary *primary)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
- instance->primary = g_memdup(primary, sizeof(*primary));
|
||||
+ instance->primary = g_memdup2(primary, sizeof(*primary));
|
||||
find_included(instance, hog->attrib, primary->range.start,
|
||||
primary->range.end, find_included_cb, instance);
|
||||
|
||||
diff --git a/profiles/scanparam/scpp.c b/profiles/scanparam/scpp.c
|
||||
index da38a6a..1134360 100644
|
||||
--- a/profiles/scanparam/scpp.c
|
||||
+++ b/profiles/scanparam/scpp.c
|
||||
@@ -110,7 +110,7 @@ struct bt_scpp *bt_scpp_new(void *primary)
|
||||
scan->gatt_op = queue_new();
|
||||
|
||||
if (primary)
|
||||
- scan->primary = g_memdup(primary, sizeof(*scan->primary));
|
||||
+ scan->primary = g_memdup2(primary, sizeof(*scan->primary));
|
||||
|
||||
return bt_scpp_ref(scan);
|
||||
}
|
||||
diff --git a/src/attrib-server.c b/src/attrib-server.c
|
||||
index 5a178f9..ce412c3 100644
|
||||
--- a/src/attrib-server.c
|
||||
+++ b/src/attrib-server.c
|
||||
@@ -339,7 +339,7 @@ static struct attribute *attrib_db_add_new(struct gatt_server *server,
|
||||
|
||||
a = g_new0(struct attribute, 1);
|
||||
a->len = len;
|
||||
- a->data = g_memdup(value, len);
|
||||
+ a->data = g_memdup2(value, len);
|
||||
a->handle = handle;
|
||||
a->uuid = *uuid;
|
||||
a->read_req = read_req;
|
||||
diff --git a/src/eir.c b/src/eir.c
|
||||
index 0f5d14f..ceeb5f7 100644
|
||||
--- a/src/eir.c
|
||||
+++ b/src/eir.c
|
||||
@@ -323,13 +323,13 @@ void eir_parse(struct eir_data *eir, const uint8_t *eir_data, uint8_t eir_len)
|
||||
case EIR_SSP_HASH:
|
||||
if (data_len < 16)
|
||||
break;
|
||||
- eir->hash = g_memdup(data, 16);
|
||||
+ eir->hash = g_memdup2(data, 16);
|
||||
break;
|
||||
|
||||
case EIR_SSP_RANDOMIZER:
|
||||
if (data_len < 16)
|
||||
break;
|
||||
- eir->randomizer = g_memdup(data, 16);
|
||||
+ eir->randomizer = g_memdup2(data, 16);
|
||||
break;
|
||||
|
||||
case EIR_DEVICE_ID:
|
||||
diff --git a/tools/gatt-service.c b/tools/gatt-service.c
|
||||
index 631c4f2..1e272a5 100644
|
||||
--- a/tools/gatt-service.c
|
||||
+++ b/tools/gatt-service.c
|
||||
@@ -127,7 +127,7 @@ static gboolean desc_get_value(const GDBusPropertyTable *property,
|
||||
static void desc_write(struct descriptor *desc, const uint8_t *value, int len)
|
||||
{
|
||||
g_free(desc->value);
|
||||
- desc->value = g_memdup(value, len);
|
||||
+ desc->value = g_memdup2(value, len);
|
||||
desc->vlen = len;
|
||||
|
||||
g_dbus_emit_property_changed(connection, desc->path,
|
||||
@@ -265,7 +265,7 @@ static gboolean chr_get_props(const GDBusPropertyTable *property,
|
||||
static void chr_write(struct characteristic *chr, const uint8_t *value, int len)
|
||||
{
|
||||
g_free(chr->value);
|
||||
- chr->value = g_memdup(value, len);
|
||||
+ chr->value = g_memdup2(value, len);
|
||||
chr->vlen = len;
|
||||
|
||||
g_dbus_emit_property_changed(connection, chr->path, GATT_CHR_IFACE,
|
||||
@@ -592,7 +592,7 @@ static gboolean register_characteristic(const char *chr_uuid,
|
||||
|
||||
chr = g_new0(struct characteristic, 1);
|
||||
chr->uuid = g_strdup(chr_uuid);
|
||||
- chr->value = g_memdup(value, vlen);
|
||||
+ chr->value = g_memdup2(value, vlen);
|
||||
chr->vlen = vlen;
|
||||
chr->props = props;
|
||||
chr->service = g_strdup(service_path);
|
||||
diff --git a/tools/mesh-gatt/gatt.c b/tools/mesh-gatt/gatt.c
|
||||
index b99234f..d7685f0 100644
|
||||
--- a/tools/mesh-gatt/gatt.c
|
||||
+++ b/tools/mesh-gatt/gatt.c
|
||||
@@ -338,7 +338,7 @@ bool mesh_gatt_write(GDBusProxy *proxy, uint8_t *buf, uint16_t len,
|
||||
/* TODO: should keep in queue in case we need to cancel write? */
|
||||
|
||||
data->gatt_len = len;
|
||||
- data->gatt_data = g_memdup(buf, len);
|
||||
+ data->gatt_data = g_memdup2(buf, len);
|
||||
data->gatt_data[0] &= GATT_TYPE_MASK;
|
||||
data->iov.iov_base = data->gatt_data;
|
||||
data->iov.iov_len = len;
|
||||
diff --git a/unit/test-avctp.c b/unit/test-avctp.c
|
||||
index fa7db59..0bd138e 100644
|
||||
--- a/unit/test-avctp.c
|
||||
+++ b/unit/test-avctp.c
|
||||
@@ -53,7 +53,7 @@ struct context {
|
||||
#define raw_pdu(args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ struct context {
|
||||
}; \
|
||||
static struct test_data data; \
|
||||
data.test_name = g_strdup(name); \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
tester_add(name, &data, NULL, function, NULL); \
|
||||
} while (0)
|
||||
|
||||
diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c
|
||||
index f5340d6..d6fdd3d 100644
|
||||
--- a/unit/test-avdtp.c
|
||||
+++ b/unit/test-avdtp.c
|
||||
@@ -48,7 +48,7 @@ struct test_data {
|
||||
#define raw_pdu(args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ struct test_data {
|
||||
{ \
|
||||
.valid = true, \
|
||||
.fragmented = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ struct test_data {
|
||||
}; \
|
||||
static struct test_data data; \
|
||||
data.test_name = g_strdup(name); \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
tester_add(name, &data, NULL, function, NULL); \
|
||||
} while (0)
|
||||
|
||||
diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
|
||||
index 34a7037..0c860e3 100644
|
||||
--- a/unit/test-avrcp.c
|
||||
+++ b/unit/test-avrcp.c
|
||||
@@ -61,7 +61,7 @@ struct context {
|
||||
#define raw_pdu(args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ struct context {
|
||||
{ \
|
||||
.valid = true, \
|
||||
.browse = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ struct context {
|
||||
{ \
|
||||
.valid = true, \
|
||||
.fragmented = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ struct context {
|
||||
{ \
|
||||
.valid = true, \
|
||||
.continuing = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ struct context {
|
||||
}; \
|
||||
static struct test_data data; \
|
||||
data.test_name = g_strdup(name); \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
tester_add(name, &data, NULL, function, NULL); \
|
||||
} while (0)
|
||||
|
||||
diff --git a/unit/test-gatt.c b/unit/test-gatt.c
|
||||
index 4aa87d0..ab16818 100644
|
||||
--- a/unit/test-gatt.c
|
||||
+++ b/unit/test-gatt.c
|
||||
@@ -73,7 +73,7 @@ struct context {
|
||||
#define raw_pdu(args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ struct context {
|
||||
data.uuid = bt_uuid; \
|
||||
data.step = test_step; \
|
||||
data.source_db = db; \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
tester_add(name, &data, NULL, function, NULL); \
|
||||
} while (0)
|
||||
|
||||
diff --git a/unit/test-hfp.c b/unit/test-hfp.c
|
||||
index f504724..6afc145 100644
|
||||
--- a/unit/test-hfp.c
|
||||
+++ b/unit/test-hfp.c
|
||||
@@ -50,7 +50,7 @@ struct test_data {
|
||||
#define raw_pdu(args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ struct test_data {
|
||||
#define type_pdu(cmd_type, args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
.type = cmd_type, \
|
||||
}
|
||||
@@ -70,7 +70,7 @@ struct test_data {
|
||||
#define frg_pdu(args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
.fragmented = true, \
|
||||
}
|
||||
@@ -82,7 +82,7 @@ struct test_data {
|
||||
}; \
|
||||
static struct test_data data; \
|
||||
data.test_name = g_strdup(name); \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
data.result_func = result_function; \
|
||||
tester_add(name, &data, NULL, function, NULL); \
|
||||
data.test_handler = test_handler; \
|
||||
@@ -96,7 +96,7 @@ struct test_data {
|
||||
}; \
|
||||
static struct test_data data; \
|
||||
data.test_name = g_strdup(name); \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
data.hf_result_func = result_func; \
|
||||
data.response_func = response_function; \
|
||||
tester_add(name, &data, NULL, function, NULL); \
|
||||
diff --git a/unit/test-hog.c b/unit/test-hog.c
|
||||
index e6d4aff..edf0633 100644
|
||||
--- a/unit/test-hog.c
|
||||
+++ b/unit/test-hog.c
|
||||
@@ -59,7 +59,7 @@ struct context {
|
||||
#define raw_pdu(args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .data = g_memdup(data(args), sizeof(data(args))), \
|
||||
+ .data = g_memdup2(data(args), sizeof(data(args))), \
|
||||
.size = sizeof(data(args)), \
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ struct context {
|
||||
}; \
|
||||
static struct test_data data; \
|
||||
data.test_name = g_strdup(name); \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
tester_add(name, &data, NULL, function, NULL); \
|
||||
} while (0)
|
||||
|
||||
diff --git a/unit/test-sdp.c b/unit/test-sdp.c
|
||||
index d3a885f..3a003ff 100644
|
||||
--- a/unit/test-sdp.c
|
||||
+++ b/unit/test-sdp.c
|
||||
@@ -47,14 +47,14 @@ struct test_data {
|
||||
#define raw_pdu(args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .raw_data = g_memdup(raw_data(args), sizeof(raw_data(args))), \
|
||||
+ .raw_data = g_memdup2(raw_data(args), sizeof(raw_data(args))), \
|
||||
.raw_size = sizeof(raw_data(args)), \
|
||||
}
|
||||
|
||||
#define raw_pdu_cont(cont, args...) \
|
||||
{ \
|
||||
.valid = true, \
|
||||
- .raw_data = g_memdup(raw_data(args), sizeof(raw_data(args))), \
|
||||
+ .raw_data = g_memdup2(raw_data(args), sizeof(raw_data(args))), \
|
||||
.raw_size = sizeof(raw_data(args)), \
|
||||
.cont_len = cont, \
|
||||
}
|
||||
@@ -66,7 +66,7 @@ struct test_data {
|
||||
}; \
|
||||
static struct test_data data; \
|
||||
data.mtu = _mtu; \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
tester_add(name, &data, NULL, test_sdp, NULL); \
|
||||
} while (0)
|
||||
|
||||
@@ -92,7 +92,7 @@ struct test_data_de {
|
||||
#define define_test_de_attr(name, input, exp) \
|
||||
do { \
|
||||
static struct test_data_de data; \
|
||||
- data.input_data = g_memdup(input, sizeof(input)); \
|
||||
+ data.input_data = g_memdup2(input, sizeof(input)); \
|
||||
data.input_size = sizeof(input); \
|
||||
data.expected = exp; \
|
||||
tester_add("/sdp/DE/ATTR/" name, &data, NULL, \
|
||||
diff --git a/unit/test-uhid.c b/unit/test-uhid.c
|
||||
index 001d39a..bfe8369 100644
|
||||
--- a/unit/test-uhid.c
|
||||
+++ b/unit/test-uhid.c
|
||||
@@ -61,7 +61,7 @@ struct context {
|
||||
}; \
|
||||
static struct test_data data; \
|
||||
data.test_name = g_strdup(name); \
|
||||
- data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
|
||||
+ data.pdu_list = g_memdup2(pdus, sizeof(pdus)); \
|
||||
tester_add(name, &data, NULL, function, NULL); \
|
||||
} while (0)
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
From 124dee151746b4a8a2e8a7194af78f2c82f75d79 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 3 Mar 2021 08:57:36 +0100
|
||||
Subject: [PATCH] media: rename local function conflicting with pause(2)
|
||||
|
||||
profiles/audio/media.c:1284:13: error: conflicting types for 'pause'; have '_Bool(void *)'
|
||||
1284 | static bool pause(void *user_data)
|
||||
| ^~~~~
|
||||
In file included from /usr/include/bits/sigstksz.h:24,
|
||||
from /usr/include/signal.h:315,
|
||||
from /usr/include/glib-2.0/glib/gbacktrace.h:36,
|
||||
from /usr/include/glib-2.0/glib.h:34,
|
||||
from profiles/audio/media.c:21:
|
||||
/usr/include/unistd.h:478:12: note: previous declaration of 'pause' with type 'int(void)'
|
||||
478 | extern int pause (void);
|
||||
| ^~~~~
|
||||
---
|
||||
profiles/audio/media.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
|
||||
index c84bbe22dc..3d8c4b69c3 100644
|
||||
--- a/profiles/audio/media.c
|
||||
+++ b/profiles/audio/media.c
|
||||
@@ -1281,7 +1281,7 @@ static bool stop(void *user_data)
|
||||
return media_player_send(mp, "Stop");
|
||||
}
|
||||
|
||||
-static bool pause(void *user_data)
|
||||
+static bool pause_play(void *user_data)
|
||||
{
|
||||
struct media_player *mp = user_data;
|
||||
|
||||
@@ -1331,7 +1331,7 @@ static struct avrcp_player_cb player_cb = {
|
||||
.set_volume = set_volume,
|
||||
.play = play,
|
||||
.stop = stop,
|
||||
- .pause = pause,
|
||||
+ .pause = pause_play,
|
||||
.next = next,
|
||||
.previous = previous,
|
||||
};
|
||||
@@ -1,61 +0,0 @@
|
||||
Submitted By: Armin K. <krejzi at email dot com>
|
||||
Date: 2013-04-29
|
||||
Initial Package Version: 5.17
|
||||
Upstream Status: unknown
|
||||
Origin: Arch Linux (Giovanni Campagna)
|
||||
Description: Allow using obexd without systemd in the user session
|
||||
|
||||
Not all sessions run systemd --user (actually, the majority
|
||||
doesn't), so the dbus daemon must be able to spawn obexd
|
||||
directly, and to do so it needs the full path of the daemon.
|
||||
---
|
||||
Makefile.obexd | 4 ++--
|
||||
obexd/src/org.bluez.obex.service | 4 ----
|
||||
obexd/src/org.bluez.obex.service.in | 4 ++++
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
delete mode 100644 obexd/src/org.bluez.obex.service
|
||||
create mode 100644 obexd/src/org.bluez.obex.service.in
|
||||
|
||||
diff --git a/Makefile.obexd b/Makefile.obexd
|
||||
index 3760867..142e7c3 100644
|
||||
--- a/Makefile.obexd
|
||||
+++ b/Makefile.obexd
|
||||
@@ -2,12 +2,12 @@
|
||||
if SYSTEMD
|
||||
systemduserunitdir = @SYSTEMD_USERUNITDIR@
|
||||
systemduserunit_DATA = obexd/src/obex.service
|
||||
+endif
|
||||
|
||||
dbussessionbusdir = @DBUS_SESSIONBUSDIR@
|
||||
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
-endif
|
||||
|
||||
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
|
||||
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
|
||||
|
||||
obex_plugindir = $(libdir)/obex/plugins
|
||||
|
||||
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
|
||||
deleted file mode 100644
|
||||
index a538088..0000000
|
||||
--- a/obexd/src/org.bluez.obex.service
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-[D-BUS Service]
|
||||
-Name=org.bluez.obex
|
||||
-Exec=/bin/false
|
||||
-SystemdService=dbus-org.bluez.obex.service
|
||||
diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
|
||||
new file mode 100644
|
||||
index 0000000..9c815f2
|
||||
--- /dev/null
|
||||
+++ b/obexd/src/org.bluez.obex.service.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+[D-BUS Service]
|
||||
+Name=org.bluez.obex
|
||||
+Exec=@libexecdir@/obexd
|
||||
+SystemdService=dbus-org.bluez.obex.service
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
Submitted By: Armin K. <krejzi at email dot com>
|
||||
Date: 2013-04-29
|
||||
Initial Package Version: 5.17
|
||||
Upstream Status: unknown
|
||||
Origin: Arch Linux (Giovanni Campagna)
|
||||
Description: Allow using obexd without systemd in the user session
|
||||
|
||||
Not all sessions run systemd --user (actually, the majority
|
||||
doesn't), so the dbus daemon must be able to spawn obexd
|
||||
directly, and to do so it needs the full path of the daemon.
|
||||
---
|
||||
Makefile.obexd | 4 ++--
|
||||
obexd/src/org.bluez.obex.service | 4 ----
|
||||
obexd/src/org.bluez.obex.service.in | 4 ++++
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
delete mode 100644 obexd/src/org.bluez.obex.service
|
||||
create mode 100644 obexd/src/org.bluez.obex.service.in
|
||||
|
||||
diff --git a/Makefile.obexd b/Makefile.obexd
|
||||
index 3760867..142e7c3 100644
|
||||
--- a/Makefile.obexd
|
||||
+++ b/Makefile.obexd
|
||||
@@ -2,12 +2,12 @@
|
||||
if SYSTEMD
|
||||
systemduserunitdir = @SYSTEMD_USERUNITDIR@
|
||||
systemduserunit_DATA = obexd/src/obex.service
|
||||
+endif
|
||||
|
||||
dbussessionbusdir = @DBUS_SESSIONBUSDIR@
|
||||
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
-endif
|
||||
|
||||
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
|
||||
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
|
||||
|
||||
obex_plugindir = $(libdir)/obex/plugins
|
||||
|
||||
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
|
||||
deleted file mode 100644
|
||||
index a538088..0000000
|
||||
--- a/obexd/src/org.bluez.obex.service
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-[D-BUS Service]
|
||||
-Name=org.bluez.obex
|
||||
-Exec=/bin/false
|
||||
-SystemdService=dbus-org.bluez.obex.service
|
||||
diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
|
||||
new file mode 100644
|
||||
index 0000000..9c815f2
|
||||
--- /dev/null
|
||||
+++ b/obexd/src/org.bluez.obex.service.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+[D-BUS Service]
|
||||
+Name=org.bluez.obex
|
||||
+Exec=@libexecdir@/obexd
|
||||
+SystemdService=dbus-org.bluez.obex.service
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
Submitted By: Armin K. <krejzi at email dot com>
|
||||
Date: 2013-04-29
|
||||
Initial Package Version: 5.17
|
||||
Upstream Status: unknown
|
||||
Origin: Arch Linux (Giovanni Campagna)
|
||||
Description: Allow using obexd without systemd in the user session
|
||||
|
||||
Not all sessions run systemd --user (actually, the majority
|
||||
doesn't), so the dbus daemon must be able to spawn obexd
|
||||
directly, and to do so it needs the full path of the daemon.
|
||||
---
|
||||
Makefile.obexd | 4 ++--
|
||||
obexd/src/org.bluez.obex.service | 4 ----
|
||||
obexd/src/org.bluez.obex.service.in | 4 ++++
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
delete mode 100644 obexd/src/org.bluez.obex.service
|
||||
create mode 100644 obexd/src/org.bluez.obex.service.in
|
||||
|
||||
diff --git a/Makefile.obexd b/Makefile.obexd
|
||||
index 3760867..142e7c3 100644
|
||||
--- a/Makefile.obexd
|
||||
+++ b/Makefile.obexd
|
||||
@@ -2,12 +2,12 @@
|
||||
if SYSTEMD
|
||||
systemduserunitdir = @SYSTEMD_USERUNITDIR@
|
||||
systemduserunit_DATA = obexd/src/obex.service
|
||||
+endif
|
||||
|
||||
dbussessionbusdir = @DBUS_SESSIONBUSDIR@
|
||||
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
-endif
|
||||
|
||||
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
|
||||
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
|
||||
|
||||
obex_plugindir = $(libdir)/obex/plugins
|
||||
|
||||
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
|
||||
deleted file mode 100644
|
||||
index a538088..0000000
|
||||
--- a/obexd/src/org.bluez.obex.service
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-[D-BUS Service]
|
||||
-Name=org.bluez.obex
|
||||
-Exec=/bin/false
|
||||
-SystemdService=dbus-org.bluez.obex.service
|
||||
diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
|
||||
new file mode 100644
|
||||
index 0000000..9c815f2
|
||||
--- /dev/null
|
||||
+++ b/obexd/src/org.bluez.obex.service.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+[D-BUS Service]
|
||||
+Name=org.bluez.obex
|
||||
+Exec=@libexecdir@/obexd
|
||||
+SystemdService=dbus-org.bluez.obex.service
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/tools/hid2hci.rules
|
||||
+++ b/tools/hid2hci.rules
|
||||
@@ -20,6 +20,7 @@
|
||||
# Unfortunately the only event seen is the BT device disappearing, so the mouse
|
||||
# device needs to be chased down on the USB bus.
|
||||
ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \
|
||||
+ ENV{REMOVE_CMD}="/bin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" \
|
||||
ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1"
|
||||
|
||||
# CSR devices
|
||||
@@ -1,41 +0,0 @@
|
||||
From e10c204e1226e94a1eaaeaee076e7e2e5b13c504 Mon Sep 17 00:00:00 2001
|
||||
From: Szymon Janc <szymon.janc@codecoup.pl>
|
||||
Date: Wed, 4 Apr 2018 09:28:56 +0200
|
||||
Subject: gatt: Fix crash with BR/EDR only adapter
|
||||
|
||||
adapter->database can be NULL if controller is BR/EDR only or LE was
|
||||
disabled. Make btd_gatt_database_restore_svc_chng_ccc accept NULL
|
||||
pointer and silently ignore it similiar to rest of btd_gatt_database
|
||||
API.
|
||||
|
||||
Invalid read of size 8
|
||||
at 0x164DCB: btd_gatt_database_restore_svc_chng_ccc (src/bluez-git/src/bluetoothd)
|
||||
by 0x17B70F: read_info_complete (src/bluez-git/src/bluetoothd)
|
||||
by 0x1A7E58: request_complete (src/bluez-git/src/bluetoothd)
|
||||
by 0x1A89AD: can_read_data (src/bluez-git/src/bluetoothd)
|
||||
by 0x1B5752: watch_callback (src/bluez-git/src/bluetoothd)
|
||||
by 0x4E852C5: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5600.0)
|
||||
by 0x4E856A0: ??? (in /usr/lib/libglib-2.0.so.0.5600.0)
|
||||
by 0x4E859D1: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.5600.0)
|
||||
by 0x125058: main (src/bluez-git/src/bluetoothd)
|
||||
Address 0x40 is not stack'd, malloc'd or (recently) free'd
|
||||
---
|
||||
src/gatt-database.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/gatt-database.c b/src/gatt-database.c
|
||||
index 1cdc72e..0ac5b75 100644
|
||||
--- a/src/gatt-database.c
|
||||
+++ b/src/gatt-database.c
|
||||
@@ -3330,6 +3330,9 @@ void btd_gatt_database_restore_svc_chng_ccc(struct btd_gatt_database *database)
|
||||
uint8_t value[4];
|
||||
uint16_t handle, ccc_handle;
|
||||
|
||||
+ if (!database)
|
||||
+ return;
|
||||
+
|
||||
handle = gatt_db_attribute_get_handle(database->svc_chngd);
|
||||
ccc_handle = gatt_db_attribute_get_handle(database->svc_chngd_ccc);
|
||||
|
||||
--
|
||||
cgit v1.1
|
||||
@@ -1,50 +0,0 @@
|
||||
From 2c3bba7b38be03834162e34069156f1fd49f0528 Mon Sep 17 00:00:00 2001
|
||||
From: "antoine.belvire@laposte.net" <antoine.belvire@laposte.net>
|
||||
Date: Tue, 27 Mar 2018 20:30:26 +0200
|
||||
Subject: adapter: Don't refresh adv_manager for non-LE devices
|
||||
|
||||
btd_adv_manager_refresh is called upon MGMT_SETTING_DISCOVERABLE setting change
|
||||
but as only LE adapters have an adv_manager, this leads to segmentation fault
|
||||
for non-LE devices:
|
||||
|
||||
0 btd_adv_manager_refresh (manager=0x0) at src/advertising.c:1176
|
||||
1 0x0000556fe45fcb02 in settings_changed (settings=<optimized out>,
|
||||
adapter=0x556fe53f7c70) at src/adapter.c:543
|
||||
2 new_settings_callback (index=<optimized out>, length=<optimized out>,
|
||||
param=<optimized out>, user_data=0x556fe53f7c70) at src/adapter.c:573
|
||||
3 0x0000556fe462c278 in request_complete (mgmt=mgmt@entry=0x556fe53f20c0,
|
||||
status=<optimized out>, opcode=opcode@entry=7, index=index@entry=0,
|
||||
length=length@entry=4, param=0x556fe53eb5f9) at src/shared/mgmt.c:261
|
||||
4 0x0000556fe462cd9d in can_read_data (io=<optimized out>,
|
||||
user_data=0x556fe53f20c0) at src/shared/mgmt.c:353
|
||||
5 0x0000556fe46396e3 in watch_callback (channel=<optimized out>,
|
||||
cond=<optimized out>, user_data=<optimized out>)
|
||||
at src/shared/io-glib.c:170
|
||||
6 0x00007fe351c980e5 in g_main_context_dispatch ()
|
||||
from /usr/lib64/libglib-2.0.so.0
|
||||
7 0x00007fe351c984b0 in ?? () from /usr/lib64/libglib-2.0.so.0
|
||||
8 0x00007fe351c987c2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
|
||||
9 0x0000556fe45abc75 in main (argc=<optimized out>, argv=<optimized out>)
|
||||
at src/main.c:770
|
||||
|
||||
This commit prevents the call to btd_adv_manager_refresh for non-LE devices.
|
||||
---
|
||||
src/adapter.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/adapter.c b/src/adapter.c
|
||||
index 6b9222b..daccfdc 100644
|
||||
--- a/src/adapter.c
|
||||
+++ b/src/adapter.c
|
||||
@@ -540,7 +540,8 @@ static void settings_changed(struct btd_adapter *adapter, uint32_t settings)
|
||||
g_dbus_emit_property_changed(dbus_conn, adapter->path,
|
||||
ADAPTER_INTERFACE, "Discoverable");
|
||||
store_adapter_info(adapter);
|
||||
- btd_adv_manager_refresh(adapter->adv_manager);
|
||||
+ if (adapter->supported_settings & MGMT_SETTING_LE)
|
||||
+ btd_adv_manager_refresh(adapter->adv_manager);
|
||||
}
|
||||
|
||||
if (changed_mask & MGMT_SETTING_BONDABLE) {
|
||||
--
|
||||
cgit v1.1
|
||||
@@ -14,7 +14,7 @@
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>Official Linux Bluetooth protocol stack</Summary>
|
||||
<Description>bluez contains the tools and libraries that provides support for the core Bluetooth layers and protocols.</Description>
|
||||
<Archive sha1sum="7528c0df967386e976b58aa5be514a817e6afe18" type="tarxz">https://mirrors.edge.kernel.org/pub/linux/bluetooth/bluez-5.85.tar.xz</Archive>
|
||||
<Archive sha1sum="6f620980e8121e94d0400b367d1cf388e3eb694c" type="tarxz">https://mirrors.edge.kernel.org/pub/linux/bluetooth/bluez-5.86.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>docutils</Dependency>
|
||||
<Dependency>alsa-lib-devel</Dependency>
|
||||
@@ -32,12 +32,7 @@
|
||||
<Dependency>python3-Pygments</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch level="1">0001-Allow-using-obexd-without-systemd-in-the-user-session-r4.patch</Patch> -->
|
||||
<!-- <Patch level="1">0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch</Patch> -->
|
||||
<!-- <Patch level="1">0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch</Patch> -->
|
||||
<!-- <Patch level="1">0001-rfkill-Fix-reading-from-rfkill-socket.patch</Patch> -->
|
||||
<!-- <Patch level="1">0002-Use-g_memdup2-everywhere.patch</Patch> -->
|
||||
<!-- <Patch level="1">0005-media-rename-local-function-conflicting-with-pause-2.patch</Patch> -->
|
||||
<Patch level="1">bluez-udevadm-path-r1.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -102,6 +97,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="28">
|
||||
<Date>2026-03-01</Date>
|
||||
<Version>5.86</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="27">
|
||||
<Date>2025-12-16</Date>
|
||||
<Version>5.85</Version>
|
||||
|
||||
Reference in New Issue
Block a user