Accepting request 232108 from Base:System
Fix build with glib 2.40 - Patch from upstream git; Fix fallout in openSUSE:Factory:Staging:F (forwarded request 232097 from dimstar) OBS-URL: https://build.opensuse.org/request/show/232108 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bluez?expand=0&rev=119
This commit is contained in:
commit
60540a1189
124
bluez-glib2.40.patch
Normal file
124
bluez-glib2.40.patch
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
From 166ef636d7e8a1d7d70f1e7d2ae849add0eab555 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Szymon Janc <szymon.janc@tieto.com>
|
||||||
|
Date: Thu, 17 Apr 2014 15:59:45 +0200
|
||||||
|
Subject: unit: Fix removing invalid source in test-hfp
|
||||||
|
|
||||||
|
Since GLib 2.39 calling g_source_remove on already removed source
|
||||||
|
is causing critical warning. This was causing unit/test-hfp to
|
||||||
|
fail when running with GLib 2.40.
|
||||||
|
|
||||||
|
./unit/test-hfp
|
||||||
|
/hfp/test_init:
|
||||||
|
(./unit/test-hfp:28878): GLib-CRITICAL **: Source ID 1 was not found
|
||||||
|
when attempting to remove it
|
||||||
|
Trace/breakpoint trap
|
||||||
|
|
||||||
|
diff --git a/unit/test-hfp.c b/unit/test-hfp.c
|
||||||
|
index 445fcb7..20aa0b5 100644
|
||||||
|
--- a/unit/test-hfp.c
|
||||||
|
+++ b/unit/test-hfp.c
|
||||||
|
@@ -121,6 +121,8 @@ static gboolean test_handler(GIOChannel *channel, GIOCondition cond,
|
||||||
|
g_assert(!pdu->valid);
|
||||||
|
context_quit(context);
|
||||||
|
|
||||||
|
+ context->watch_id = 0;
|
||||||
|
+
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -187,7 +189,8 @@ static void execute_context(struct context *context)
|
||||||
|
{
|
||||||
|
g_main_loop_run(context->main_loop);
|
||||||
|
|
||||||
|
- g_source_remove(context->watch_id);
|
||||||
|
+ if (context->watch_id)
|
||||||
|
+ g_source_remove(context->watch_id);
|
||||||
|
|
||||||
|
g_main_loop_unref(context->main_loop);
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v0.10.1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
From 87dc59894d8ea1396200a5bc66a4d2a5f7666f41 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Szymon Janc <szymon.janc@tieto.com>
|
||||||
|
Date: Thu, 17 Apr 2014 15:59:46 +0200
|
||||||
|
Subject: gobex: Fix removing invalid source
|
||||||
|
|
||||||
|
Since GLib 2.39 calling g_source_remove on already removed source
|
||||||
|
is causing critical warning.
|
||||||
|
|
||||||
|
This was affecting unit/test-gobex-transfer when running with
|
||||||
|
GLib 2.40.
|
||||||
|
|
||||||
|
/gobex/test_packet_get_req_suspend_resume:
|
||||||
|
(./unit/test-gobex-transfer:28879): GLib-CRITICAL **: Source ID 263 was
|
||||||
|
not found when attempting to remove it
|
||||||
|
Trace/breakpoint trap
|
||||||
|
|
||||||
|
diff --git a/gobex/gobex.c b/gobex/gobex.c
|
||||||
|
index 887e2a2..3848884 100644
|
||||||
|
--- a/gobex/gobex.c
|
||||||
|
+++ b/gobex/gobex.c
|
||||||
|
@@ -263,6 +263,8 @@ static gboolean req_timeout(gpointer user_data)
|
||||||
|
g_error_free(err);
|
||||||
|
pending_pkt_free(p);
|
||||||
|
|
||||||
|
+ p->timeout_id = 0;
|
||||||
|
+
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -778,7 +780,9 @@ static gboolean pending_req_abort(GObex *obex, GError **err)
|
||||||
|
|
||||||
|
p->cancelled = TRUE;
|
||||||
|
|
||||||
|
- g_source_remove(p->timeout_id);
|
||||||
|
+ if (p->timeout_id > 0)
|
||||||
|
+ g_source_remove(p->timeout_id);
|
||||||
|
+
|
||||||
|
p->timeout = G_OBEX_ABORT_TIMEOUT;
|
||||||
|
p->timeout_id = g_timeout_add_seconds(p->timeout, req_timeout, obex);
|
||||||
|
|
||||||
|
@@ -922,7 +926,11 @@ static void g_obex_srm_suspend(GObex *obex)
|
||||||
|
struct pending_pkt *p = obex->pending_req;
|
||||||
|
GObexPacket *req;
|
||||||
|
|
||||||
|
- g_source_remove(p->timeout_id);
|
||||||
|
+ if (p->timeout_id > 0) {
|
||||||
|
+ g_source_remove(p->timeout_id);
|
||||||
|
+ p->timeout_id = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
p->suspended = TRUE;
|
||||||
|
|
||||||
|
req = g_obex_packet_new(G_OBEX_OP_GET, TRUE,
|
||||||
|
@@ -1017,8 +1025,10 @@ static void auth_challenge(GObex *obex)
|
||||||
|
|
||||||
|
/* Remove it as pending and add it back to the queue so it gets sent
|
||||||
|
* again */
|
||||||
|
- g_source_remove(p->timeout_id);
|
||||||
|
- p->timeout_id = 0;
|
||||||
|
+ if (p->timeout_id > 0) {
|
||||||
|
+ g_source_remove(p->timeout_id);
|
||||||
|
+ p->timeout_id = 0;
|
||||||
|
+ }
|
||||||
|
obex->pending_req = NULL;
|
||||||
|
g_obex_send_internal(obex, p, NULL);
|
||||||
|
}
|
||||||
|
@@ -1076,7 +1086,9 @@ static gboolean parse_response(GObex *obex, GObexPacket *rsp)
|
||||||
|
* continue sending responses until the transfer is finished
|
||||||
|
*/
|
||||||
|
if (opcode == G_OBEX_OP_GET && rspcode == G_OBEX_RSP_CONTINUE) {
|
||||||
|
- g_source_remove(p->timeout_id);
|
||||||
|
+ if (p->timeout_id > 0)
|
||||||
|
+ g_source_remove(p->timeout_id);
|
||||||
|
+
|
||||||
|
p->timeout_id = g_timeout_add_seconds(p->timeout, req_timeout,
|
||||||
|
obex);
|
||||||
|
return FALSE;
|
||||||
|
--
|
||||||
|
cgit v0.10.1
|
||||||
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 29 18:16:11 UTC 2014 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Add bluez-glib2.40.patch: Fix build with GLib 2.40: Since GLib
|
||||||
|
2.39 calling g_source_remove on already removed source is causing
|
||||||
|
critical warning.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Apr 13 10:46:02 UTC 2014 - seife+obs@b1-systems.com
|
Sun Apr 13 10:46:02 UTC 2014 - seife+obs@b1-systems.com
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ Source99: README.packagers
|
|||||||
# fix some logitech HID devices, bnc#681049, bnc#850478 --seife+obs@b1-systems.com
|
# fix some logitech HID devices, bnc#681049, bnc#850478 --seife+obs@b1-systems.com
|
||||||
Patch1: bluez-5.11-logitech-hid2hci.patch
|
Patch1: bluez-5.11-logitech-hid2hci.patch
|
||||||
Patch2: bluez-sdp-unix-path.patch
|
Patch2: bluez-sdp-unix-path.patch
|
||||||
|
# PATCH-FIX-UPSTREAM bluez-glib2.40.patch dimstar@opensuse.org -- Fix build with GLib 2.40, taken from upstream git
|
||||||
|
Patch3: bluez-glib2.40.patch
|
||||||
BuildRequires: alsa-devel
|
BuildRequires: alsa-devel
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
@ -113,6 +115,7 @@ BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
cp %{SOURCE6} .
|
cp %{SOURCE6} .
|
||||||
mkdir dbus-apis
|
mkdir dbus-apis
|
||||||
cp -a doc/*.txt dbus-apis/
|
cp -a doc/*.txt dbus-apis/
|
||||||
|
Loading…
Reference in New Issue
Block a user