- Add Bluetooth support, with patch from Matt Davey

<mcdavey@mrao.cam.ac.uk> to avoid crashing when pi_close is called
This commit is contained in:
Bastien Nocera 2008-01-09 12:04:17 +00:00
parent 2b42a61ec1
commit e8af9a2599
2 changed files with 79 additions and 1 deletions

View File

@ -0,0 +1,71 @@
? bluetooth-session-register.diff
? cscope.out
? pilot-link-0.12.0.tar.gz
? bindings/Python/setup-standalone.py
? src/pilot-csd
? src/pilot-debugsh
? src/pilot-dlpsh
? src/pilot-foto-treo600
? src/pilot-foto-treo650
? src/pilot-getram
? src/pilot-getrom
? src/pilot-getromtoken
? src/pilot-hinotes
? src/pilot-install-datebook
? src/pilot-install-expenses
? src/pilot-install-hinote
? src/pilot-install-memo
? src/pilot-install-netsync
? src/pilot-install-todo
? src/pilot-install-todos
? src/pilot-install-user
? src/pilot-memos
? src/pilot-nredir
? src/pilot-read-expenses
? src/pilot-read-ical
? src/pilot-read-notepad
? src/pilot-read-palmpix
? src/pilot-read-screenshot
? src/pilot-read-todos
? src/pilot-read-veo
? src/pilot-reminders
Index: libpisock/bluetooth.c
===================================================================
RCS file: /cvs/pilot-link/pilot-link_src/libpisock/bluetooth.c,v
retrieving revision 1.3
diff -a -u -p -r1.3 bluetooth.c
--- libpisock/bluetooth.c 8 Feb 2007 17:08:52 -0000 1.3
+++ libpisock/bluetooth.c 28 Dec 2007 12:31:24 -0000
@@ -167,19 +167,19 @@ add_hotsync(sdp_session_t *session,
}
static int
-register_sdp (uint32_t *handle, int *channel, sdp_session_t *sess)
+register_sdp (uint32_t *handle, int *channel, sdp_session_t **sess)
{
svc_info_t si;
bdaddr_t interface;
bacpy (&interface, BDADDR_ANY);
- sess = sdp_connect (&interface, BDADDR_LOCAL, 0);
+ *sess = sdp_connect (&interface, BDADDR_LOCAL, 0);
- if (!sess)
+ if (*sess == NULL)
return -1;
memset (&si, 0, sizeof(si));
si.name = "HOTSYNC";
- return add_hotsync (sess, 0, &interface, &si, handle, channel);
+ return add_hotsync (*sess, 0, &interface, &si, handle, channel);
}
static int
@@ -325,7 +325,7 @@ pi_bluetooth_protocol (pi_device_t *dev)
static void
pi_bluetooth_register_hotsync_sdp (struct pi_bluetooth_data *data)
{
- if (register_sdp (&data->handle, &data->channel, data->sess) < 0) {
+ if (register_sdp (&data->handle, &data->channel, &data->sess) < 0) {
data->channel = -1;
data->handle = 0;
data->sess = NULL;

View File

@ -3,7 +3,7 @@
Name: pilot-link
Version: 0.12.3
Release: 4%{?dist}
Release: 5%{?dist}
Epoch: 2
License: GPLv2 and GPLv2+ and LGPLv2+ and TCL
Group: Applications/Communications
@ -25,6 +25,7 @@ ExcludeArch: s390 s390x
Patch4: pilot-link-0.12.1-var.patch
Patch6: pilot-link-0.12.2-open.patch
Patch7: pilot-link-0.12.3-md5.patch
Patch8: bluetooth-session-register.diff
Requires(post): /sbin/ldconfig, /sbin/modprobe
Requires(postun): /sbin/ldconfig
@ -40,6 +41,7 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: libusb-devel
BuildRequires: bluez-libs-devel
%description
This suite of tools allows you to upload and download programs and
@ -78,6 +80,7 @@ need to install pilot-link-devel.
%endif
%patch6 -p1 -b .open
%patch7 -p1 -b .md5
%patch8 -p0 -b .bluetooth-sdp
%build
autoreconf -is
@ -193,6 +196,10 @@ rm -rf %{buildroot}
%{_datadir}/aclocal/*.m4
%changelog
* Wed Jan 09 2008 - Bastien Nocera <bnocera@redhat.com> - 2:0.12.3-5
- Add Bluetooth support, with patch from Matt Davey <mcdavey@mrao.cam.ac.uk>
to avoid crashing when pi_close is called
* Mon Jan 7 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 2:0.12.3-4
- Synchronize with F-8 branch:
- Add README.fedora and visor configs as fallbacks (#280251: thanks Kevin Page)