forked from pool/bluez
Accepting request 666265 from home:seife:testing
add btgatt-client to bluez-test, remove bluez-5.50-gcc9.patch again OBS-URL: https://build.opensuse.org/request/show/666265 OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=256
This commit is contained in:
parent
d25b5894c8
commit
7852cb2a8e
@ -1,49 +0,0 @@
|
||||
Index: b/unit/test-sdp.c
|
||||
===================================================================
|
||||
--- a/unit/test-sdp.c
|
||||
+++ b/unit/test-sdp.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/uio.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
@@ -197,27 +198,23 @@ static gboolean send_pdu(gpointer user_d
|
||||
{
|
||||
struct context *context = user_data;
|
||||
const struct sdp_pdu *req_pdu;
|
||||
- uint16_t pdu_len;
|
||||
- unsigned char *buf;
|
||||
+ struct iovec iov[2];
|
||||
ssize_t len;
|
||||
|
||||
req_pdu = &context->data->pdu_list[context->pdu_offset];
|
||||
|
||||
- pdu_len = req_pdu->raw_size + context->cont_size;
|
||||
+ iov[0].iov_base = (void *) req_pdu->raw_data;
|
||||
+ iov[0].iov_len = req_pdu->raw_size;
|
||||
|
||||
- buf = g_malloc0(pdu_len);
|
||||
+ iov[1].iov_base = context->cont_data;
|
||||
+ iov[1].iov_len = context->cont_size;
|
||||
|
||||
- memcpy(buf, req_pdu->raw_data, req_pdu->raw_size);
|
||||
+ if (context->cont_size && context->cont_size != req_pdu->cont_len)
|
||||
+ put_be16(req_pdu->cont_len, iov[1].iov_base + 4);
|
||||
|
||||
- if (context->cont_size > 0)
|
||||
- memcpy(buf + req_pdu->raw_size, context->cont_data,
|
||||
- context->cont_size);
|
||||
+ len = writev(context->fd, iov, 2);
|
||||
|
||||
- len = write(context->fd, buf, pdu_len);
|
||||
-
|
||||
- g_free(buf);
|
||||
-
|
||||
- g_assert(len == pdu_len);
|
||||
+ g_assert(len == (ssize_t) (iov[0].iov_len + iov[1].iov_len));
|
||||
|
||||
return FALSE;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 10 18:55:13 UTC 2019 - Stefan Seyfried <seife+obs@b1-systems.com>
|
||||
Tue Jan 15 09:05:19 UTC 2019 - seife+obs@b1-systems.com
|
||||
|
||||
- add bluez-5.50-gcc9.patch (boo#1121404, bko#202213)
|
||||
- add btgatt-client to bluez-test
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 4 19:15:59 UTC 2018 - seife+obs@b1-systems.com
|
||||
|
@ -38,8 +38,6 @@ Patch4: bluez-5.45-disable-broken-tests.diff
|
||||
Patch5: 0001-obexd-use-AM_LDFLAGS-for-linking.patch
|
||||
# disable tests for bypass boo#1078285
|
||||
Patch6: disable_some_obex_tests.patch
|
||||
# gcc9
|
||||
Patch7: bluez-5.50-gcc9.patch
|
||||
# Upstream suggests to use btmon instead of hcidump and does not want those patches
|
||||
# => PATCH-FIX-OPENSUSE for those two :-)
|
||||
# fix some memory leak with malformed packet (reported upstream but not yet fixed)
|
||||
@ -153,7 +151,6 @@ desktop specific applets like blueman or GNOME or KDE applets).
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
%patch6 -p1
|
||||
%endif
|
||||
%patch7 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
mkdir dbus-apis
|
||||
@ -201,8 +198,13 @@ rm %{buildroot}%{_userunitdir}/obex.service
|
||||
|
||||
## same as in fedora...
|
||||
# "make install" fails to install gatttool, used with Bluetooth Low Energy
|
||||
# boo#970628
|
||||
install -m0755 attrib/gatttool %{buildroot}%{_bindir}
|
||||
|
||||
## install btgatt-client for -test package, see
|
||||
## https://www.spinics.net/lists/linux-bluetooth/msg63258.html
|
||||
install -m0755 tools/btgatt-client %{buildroot}%{_bindir}
|
||||
|
||||
# for auto-enable subpackage
|
||||
find . -name main.conf
|
||||
install --mode 0644 -D src/main.conf %{buildroot}/%{_sysconfdir}/bluetooth/main.conf
|
||||
@ -314,6 +316,7 @@ make check V=0
|
||||
#{_bindir}/hciemu
|
||||
%{_bindir}/l2test
|
||||
%{_bindir}/rctest
|
||||
%{_bindir}/btgatt-client
|
||||
%dir %{_libdir}/bluez
|
||||
%{_libdir}/bluez/test
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user