public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gnome-user-share] wip/oholy/f45-update: - Add patch to port to BlueZ 4.x API
@ 2026-06-24 11:34 Bastien Nocera
0 siblings, 0 replies; only message in thread
From: Bastien Nocera @ 2026-06-24 11:34 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gnome-user-share
Branch : wip/oholy/f45-update
Commit : 53a1ea4d768bd0143dbbe1f1a881d30af2401918
Author : Bastien Nocera <hadess@fedoraproject.org>
Date : 2008-09-22T17:18:23+00:00
Stats : +125/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gnome-user-share/c/53a1ea4d768bd0143dbbe1f1a881d30af2401918?branch=wip/oholy/f45-update
Log:
- Add patch to port to BlueZ 4.x API
---
diff --git a/gnome-user-share.spec b/gnome-user-share.spec
index 2255689..53cd97e 100644
--- a/gnome-user-share.spec
+++ b/gnome-user-share.spec
@@ -1,12 +1,14 @@
Summary: Gnome user file sharing
Name: gnome-user-share
Version: 0.31
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-user-share/0.31/%{name}-%{version}.tar.gz
+Patch1: gus-bluez4-update.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: httpd >= 2.2.0
Requires: obex-data-server >= 0.3
@@ -38,6 +40,7 @@ The program also allows to share files using ObexFTP over Bluetooth.
%prep
%setup -q
+%patch1 -p0 -b .bluez4
%build
%configure
@@ -97,6 +100,9 @@ fi
%{_datadir}/icons/hicolor/*/apps/gnome-obex-server.png
%changelog
+* Mon Sep 22 2008 - Bastien Nocera <bnocera@redhat.com> - 0.31-3
+- Add patch to port to BlueZ 4.x API
+
* Sun May 4 2008 Matthias Clasen <mclasen@redhat.com> - 0.31-2
- Fix source url
diff --git a/gus-bluez4-update.patch b/gus-bluez4-update.patch
new file mode 100644
index 0000000..19756c5
--- /dev/null
+++ b/gus-bluez4-update.patch
@@ -0,0 +1,118 @@
+Index: src/obexpush.c
+===================================================================
+--- src/obexpush.c (revision 259)
++++ src/obexpush.c (working copy)
+@@ -184,7 +184,7 @@
+ DBusGConnection *connection;
+ DBusGProxy *manager;
+ GError *error = NULL;
+- char **adapters;
++ GPtrArray *adapters;
+ gboolean retval = FALSE;
+ guint i;
+
+@@ -193,52 +193,74 @@
+ return FALSE;
+
+ manager = dbus_g_proxy_new_for_name (connection, "org.bluez",
+- "/org/bluez", "org.bluez.Manager");
++ "/", "org.bluez.Manager");
+ if (manager == NULL) {
+ dbus_g_connection_unref (connection);
+ return FALSE;
+ }
+
+- if (dbus_g_proxy_call (manager, "ListAdapters", &error, G_TYPE_INVALID, G_TYPE_STRV, &adapters, G_TYPE_INVALID) == FALSE) {
++ if (dbus_g_proxy_call (manager, "ListAdapters", &error, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &adapters, G_TYPE_INVALID) == FALSE) {
+ g_object_unref (manager);
+ dbus_g_connection_unref (connection);
+ return FALSE;
+ }
+
+- for (i = 0; adapters[i] != NULL; i++) {
+- DBusGProxy *adapter;
+- gboolean bonded, trusted;
++ for (i = 0; i < adapters->len; i++) {
++ DBusGProxy *adapter, *device;
++ char *device_path;
++ GHashTable *props;
+
+- g_message ("checking adapter %s", adapters[i]);
++ g_message ("checking adapter %s", g_ptr_array_index (adapters, i));
+
+ adapter = dbus_g_proxy_new_for_name (connection, "org.bluez",
+- adapters[i], "org.bluez.Adapter");
+- if (dbus_g_proxy_call (adapter, "HasBonding", NULL,
+- G_TYPE_STRING, bdaddr, G_TYPE_INVALID,
+- G_TYPE_BOOLEAN, &bonded, G_TYPE_INVALID) != FALSE) {
++ g_ptr_array_index (adapters, i), "org.bluez.Adapter");
++
++ if (dbus_g_proxy_call (adapter, "FindDevice", NULL,
++ G_TYPE_STRING, bdaddr, G_TYPE_INVALID,
++ DBUS_TYPE_G_OBJECT_PATH, &device_path, G_TYPE_INVALID) == FALSE)
++ {
++ g_object_unref (adapter);
++ continue;
++ }
++
++ device = dbus_g_proxy_new_for_name (connection, "org.bluez", device_path, "org.bluez.Device");
++
++ if (dbus_g_proxy_call (device, "GetProperties", NULL,
++ G_TYPE_INVALID, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
++ &props, G_TYPE_INVALID) != FALSE)
++ {
++ GValue *value;
++ gboolean bonded, trusted;
++
++ value = g_hash_table_lookup (props, "Paired");
++ bonded = g_value_get_boolean (value);
+ g_message ("%s is %s", bdaddr, bonded ? "bonded" : "not bonded");
+- if (bonded != FALSE) {
++
++ if (bonded) {
++ g_hash_table_destroy (props);
++ g_object_unref (device);
++ g_object_unref (adapter);
+ retval = TRUE;
+- g_object_unref (adapter);
+ break;
+ }
+- }
+- if (accept_setting == ACCEPT_BONDED_AND_TRUSTED &&
+- dbus_g_proxy_call (adapter, "IsTrusted", NULL,
+- G_TYPE_STRING, bdaddr, G_TYPE_INVALID,
+- G_TYPE_BOOLEAN, &trusted, G_TYPE_INVALID) != FALSE) {
++ value = g_hash_table_lookup (props, "Trusted");
++ trusted = g_value_get_boolean (value);
+ g_message ("%s is %s", bdaddr, trusted ? "trusted" : "not trusted");
+- if (trusted != FALSE) {
++
++ if (accept_setting == ACCEPT_BONDED_AND_TRUSTED
++ && trusted) {
++ g_hash_table_destroy (props);
++ g_object_unref (device);
++ g_object_unref (adapter);
+ retval = TRUE;
+- g_object_unref (adapter);
+ break;
+ }
+ }
+-
+ g_object_unref(adapter);
+ }
+
+- g_strfreev(adapters);
++ g_ptr_array_free (adapters, TRUE);
++
+ g_object_unref(manager);
+ dbus_g_connection_unref(connection);
+
+@@ -351,7 +373,7 @@
+ cancelled_cb (DBusGProxy *session,
+ gpointer user_data)
+ {
+- //FIXME implement properly
++ //FIXME implement properly, we never actually finished the transfer
+ g_message ("transfered was cancelled by the sender");
+ transfer_completed_cb (session, user_data);
+ }
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-24 11:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-24 11:34 [rpms/gnome-user-share] wip/oholy/f45-update: - Add patch to port to BlueZ 4.x API Bastien Nocera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox